diff --git a/refer_landing_page/app/console/_components/AdminComponents.tsx b/refer_landing_page/app/console/_components/AdminComponents.tsx index 5473f1a..680a6e5 100644 --- a/refer_landing_page/app/console/_components/AdminComponents.tsx +++ b/refer_landing_page/app/console/_components/AdminComponents.tsx @@ -3,7 +3,6 @@ import React, { useState } from "react"; import Link from "next/link"; import { useRouter } from "next/navigation"; -import ThemeToggle from "@/components/ThemeToggle"; export function getClientToken(): string { if (typeof window === "undefined") return ""; @@ -31,10 +30,7 @@ export function AdminHeader({ title, description, action }: { title: string; des

{title}

{description &&

{description}

} -
- {action} - -
+ {action &&
{action}
} ); } diff --git a/refer_landing_page/app/console/publications/page.tsx b/refer_landing_page/app/console/publications/page.tsx index 5c741f4..c6e4221 100644 --- a/refer_landing_page/app/console/publications/page.tsx +++ b/refer_landing_page/app/console/publications/page.tsx @@ -340,12 +340,14 @@ export default function AdminPublicationsPage() { onChange={(e) => setFilterCategory(e.target.value)} className="px-2.5 py-1 text-xs border border-line rounded bg-paper text-ink focus:outline-none focus:ring-1 focus:ring-cobalt" > - + @@ -357,9 +359,15 @@ export default function AdminPublicationsPage() { onChange={(e) => setFilterYear(e.target.value)} className="px-2.5 py-1 text-xs border border-line rounded bg-paper text-ink focus:outline-none focus:ring-1 focus:ring-cobalt" > - + {pubYears.map((yr) => { - const count = publications.filter((p) => (p.published_at || "").includes(yr)).length; + const count = publications.filter((p) => { + const matchCat = filterCategory === "all" || p.category === filterCategory; + const matchYr = (p.published_at || "").includes(yr); + return matchCat && matchYr; + }).length; return (