diff --git a/src/app/builders/[slug]/page.tsx b/src/app/builders/[slug]/page.tsx index 97edea5..7bb992b 100644 --- a/src/app/builders/[slug]/page.tsx +++ b/src/app/builders/[slug]/page.tsx @@ -2,7 +2,7 @@ import { notFound } from "next/navigation"; import type { Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; -import { fetchBuilder, fetchBuilders } from "@/lib/api/builders"; +import { fetchBuilder } from "@/lib/api/builders"; export async function generateMetadata({ params, diff --git a/src/app/content/ContentFeedClient.tsx b/src/app/content/ContentFeedClient.tsx index 227c83f..c1d583b 100644 --- a/src/app/content/ContentFeedClient.tsx +++ b/src/app/content/ContentFeedClient.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { useSearchParams } from "next/navigation"; import SectionLabel from "@/components/SectionLabel"; import { diff --git a/src/app/memos/MemosListClient.tsx b/src/app/memos/MemosListClient.tsx index 1583acc..983797d 100644 --- a/src/app/memos/MemosListClient.tsx +++ b/src/app/memos/MemosListClient.tsx @@ -20,6 +20,7 @@ function CategoryFromSearchParams({ categories }: { categories: string[] }) { if (category && categories.includes(category)) { setActiveCategory(category); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return null; diff --git a/src/app/memos/[slug]/MemoHero.tsx b/src/app/memos/[slug]/MemoHero.tsx index e491a6d..5d863e4 100644 --- a/src/app/memos/[slug]/MemoHero.tsx +++ b/src/app/memos/[slug]/MemoHero.tsx @@ -2,7 +2,6 @@ import Image from "next/image"; import Link from "next/link"; interface MemoHeroProps { - category: string | null; title: string; authorName: string; authorImage: string | null; @@ -13,7 +12,6 @@ interface MemoHeroProps { } export function MemoHero({ - category, title, authorName, authorImage, diff --git a/src/app/memos/[slug]/page.tsx b/src/app/memos/[slug]/page.tsx index de905a7..1304995 100644 --- a/src/app/memos/[slug]/page.tsx +++ b/src/app/memos/[slug]/page.tsx @@ -1,10 +1,8 @@ import { notFound } from "next/navigation"; import type { Metadata } from "next"; -import Image from "next/image"; import { fetchMemo, fetchMemos, getSiteConfig } from "@/lib/api"; import { extractHeadings } from "@/lib/extract-headings"; import { TwitterEmbed, MemoSubscribe, RelatedMemos } from "./MemoClientParts"; -import { AuthorCard } from "./AuthorCard"; import { ShareSection } from "@/components/share"; import { MemoHero } from "./MemoHero"; import { Signpost } from "@/components/custom/signpost"; @@ -37,7 +35,7 @@ export async function generateMetadata({ const title = `${memo.title} | Build Canada`; const description = memo.keyMessage1; - const image = memo.seoImage || memo.splashImage || undefined; + const image = memo.seoImage || undefined; return { title, @@ -100,7 +98,6 @@ export default async function MemoDetailPage({ slug: memo.slug, keyMessage1: memo.keyMessage1, seoImage: memo.seoImage, - splashImage: memo.splashImage, publishedAt: memo.publishedAt ? new Date(memo.publishedAt) : null, createdAt: new Date(memo.createdAt), updatedAt: new Date(memo.updatedAt), @@ -187,21 +184,7 @@ export default async function MemoDetailPage({ - {memo.splashImage && ( -
- -
- )} - -
- {SOCIALS.map(({ label, href, iconFile }) => ( - - {label} - - ))} - {/* /content is being phased out — hide entry point until decision is finalized. -
- - Full Archive - - */} -
-
- ); -} - - function FeedAndEvents() { return (
diff --git a/src/app/toronto/memos/[slug]/page.tsx b/src/app/toronto/memos/[slug]/page.tsx index 615c90f..eebfa75 100644 --- a/src/app/toronto/memos/[slug]/page.tsx +++ b/src/app/toronto/memos/[slug]/page.tsx @@ -1,6 +1,5 @@ import { notFound } from "next/navigation"; import type { Metadata } from "next"; -import Image from "next/image"; import { fetchMemo, fetchMemos, getSiteConfig } from "@/lib/api"; import { extractHeadings } from "@/lib/extract-headings"; import { @@ -43,7 +42,7 @@ export async function generateMetadata({ const title = memo.title; const description = memo.keyMessage1; - const image = memo.seoImage || memo.splashImage || undefined; + const image = memo.seoImage || undefined; return { title, @@ -103,7 +102,6 @@ export default async function TorontoMemoDetailPage({ slug: memo.slug, keyMessage1: memo.keyMessage1, seoImage: memo.seoImage, - splashImage: memo.splashImage, publishedAt: memo.publishedAt ? new Date(memo.publishedAt) : null, createdAt: new Date(memo.createdAt), updatedAt: new Date(memo.updatedAt), @@ -158,21 +156,7 @@ export default async function TorontoMemoDetailPage({ dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }} /> - {memo.splashImage && ( -
- -
- )} - projects.find((p) => p.slug === slug)) .filter((p): p is ProjectData => p != null); diff --git a/src/components/custom/signpost/desktop-nav.tsx b/src/components/custom/signpost/desktop-nav.tsx index da7ee17..d109ed2 100644 --- a/src/components/custom/signpost/desktop-nav.tsx +++ b/src/components/custom/signpost/desktop-nav.tsx @@ -9,7 +9,7 @@ import { TocTree } from "./toc-tree"; import { ShareButtons } from "@/components/share/ui/ShareButtons"; export function DesktopNav() { - const { tree, activeId, activeParentId, navigateTo, shareTitle, shareUrl } = useSignpost(); + const { activeId, activeParentId, navigateTo, shareTitle, shareUrl } = useSignpost(); const containerRef = useRef(null); useEffect(() => { diff --git a/src/components/tracker/ChartLine.tsx b/src/components/tracker/ChartLine.tsx index 683f849..1a6c150 100644 --- a/src/components/tracker/ChartLine.tsx +++ b/src/components/tracker/ChartLine.tsx @@ -59,7 +59,6 @@ import { // The override signature in chart.js types is stricter than what date-fns // returns (Date vs number), but the runtime behavior is correct — date-fns // Date instances are coerced to numbers by chart.js internals. -// eslint-disable-next-line @typescript-eslint/no-explicit-any _adapters._date.override({ _id: "date-fns", formats: () => ({ diff --git a/src/components/tracker/MinistryGrid.tsx b/src/components/tracker/MinistryGrid.tsx index 8e553ff..0675e33 100644 --- a/src/components/tracker/MinistryGrid.tsx +++ b/src/components/tracker/MinistryGrid.tsx @@ -1,6 +1,7 @@ "use client"; import { useState, useRef } from "react"; +import Image from "next/image"; import Link from "next/link"; import type { CommitmentListing, MinistryGroup } from "@/lib/commitment-types"; @@ -47,9 +48,12 @@ function MinistryCard({ ministry }: { ministry: MinistryGroup }) { {minister && (
{minister.avatar_url ? ( - {`${minister.first_name} ) : ( diff --git a/src/components/tracker/Sidebar.tsx b/src/components/tracker/Sidebar.tsx index 6f7e15c..425d024 100644 --- a/src/components/tracker/Sidebar.tsx +++ b/src/components/tracker/Sidebar.tsx @@ -1,6 +1,7 @@ "use client"; import { usePathname } from "next/navigation"; import useSWR from "swr"; +import Image from "next/image"; import Link from "next/link"; import type { DashboardResponse, @@ -45,9 +46,11 @@ function SidebarLogo() { return (
- Build Canada @@ -118,9 +121,12 @@ function DefaultSidebar({ pageTitle }: { pageTitle: string }) {
{pmDept?.minister?.avatar_url && (
- Mark Carney
@@ -385,12 +391,15 @@ function SupportingMinisterCard({ minister }: { minister: MinisterInfo }) { return (
-
+
{minister.avatar_url ? ( - {fullName} ) : (
@@ -447,12 +456,15 @@ function MinisterCard({

{departmentName}

-
+
{minister.avatar_url ? ( - {fullName} ) : (
diff --git a/src/components/ui/memo-card.tsx b/src/components/ui/memo-card.tsx index 3e2115a..4baaf63 100644 --- a/src/components/ui/memo-card.tsx +++ b/src/components/ui/memo-card.tsx @@ -12,7 +12,7 @@ export interface Memo { } | null; keyMessage1?: string | null; category?: string | null; - splashImage?: string | null; + bannerImage?: string | null; seoImage?: string | null; publishedAt?: string | null; createdAt?: string; @@ -94,12 +94,12 @@ export function MemoCard({ const isDark = variant === 'dark' || variant === 'featured'; const isFeatured = variant === 'featured'; - const hasImage = isDark && (memo.splashImage || memo.seoImage); + const hasImage = isDark && memo.bannerImage; const imageEl = hasImage ? (
{ slug: p.slug, summary: p.summary, body: p.body, + bannerImage: p.banner_image_url, seoImage: p.seo_image_url, publishedAt: p.published_at, createdAt: p.published_at ?? new Date().toISOString(), diff --git a/src/lib/api/types.ts b/src/lib/api/types.ts index db4dcdf..c8dcc5e 100644 --- a/src/lib/api/types.ts +++ b/src/lib/api/types.ts @@ -29,6 +29,7 @@ export interface YFMemo { featured: boolean; published_at: string | null; seo_image_url: string | null; + banner_image_url: string | null; author: YFAuthor; } @@ -41,7 +42,6 @@ export interface YFMemoDetail extends YFMemo { author_name: string | null; author_title: string | null; co_author: YFAuthor | null; - splash_image_url: string | null; } export interface YFTeamMember { @@ -95,6 +95,7 @@ export interface YFPost { summary: string | null; published_at: string | null; seo_image_url: string | null; + banner_image_url: string | null; } export interface YFPostDetail extends YFPost { diff --git a/src/lib/schemas/generators/article.ts b/src/lib/schemas/generators/article.ts index 2f84f0e..4e6589e 100644 --- a/src/lib/schemas/generators/article.ts +++ b/src/lib/schemas/generators/article.ts @@ -12,7 +12,6 @@ interface MemoData { slug: string; keyMessage1?: string | null; seoImage?: string | null; - splashImage?: string | null; publishedAt?: Date | string | null; createdAt: Date | string; updatedAt: Date | string; @@ -27,7 +26,7 @@ export function generateArticleSchema( "@type": "Article" as const, headline: memo.title, description: memo.keyMessage1, - image: memo.seoImage || memo.splashImage, + image: memo.seoImage, datePublished: toISO8601(memo.publishedAt ?? memo.createdAt), dateModified: toISO8601(memo.updatedAt), author: generatePersonSchema(author),