From e342cfabd7d7239e54f60216a4eab45740fe9aac Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 22 Jun 2026 18:33:33 -0700 Subject: show song category on main page --- src/app/(main)/page.tsx | 21 +++++++++------------ src/app/components/sidebar.tsx | 2 +- src/app/context/auth.tsx | 1 - src/app/page.styles.ts | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/app/(main)/page.tsx b/src/app/(main)/page.tsx index 45af528..41e8088 100644 --- a/src/app/(main)/page.tsx +++ b/src/app/(main)/page.tsx @@ -28,6 +28,7 @@ import { CardInfo, CardTitle, CardSub, + CardTag, EmptyState, TypingGlobalStyle, } from "../page.styles"; @@ -40,11 +41,12 @@ interface ChartRecord { lrc: string; media: string; offset: number; + category: string; } export default function TypingPage() { - const { user, signOut } = useAuth(); + const { user } = useAuth(); const [charts, setCharts] = useState([]); const [search, setSearch] = useState(""); @@ -59,8 +61,9 @@ export default function TypingPage() { const filtered = normalizedSearch ? charts.filter( (item) => - item.title.toLowerCase().includes(normalizedSearch) || - item.artist.toLowerCase().includes(normalizedSearch), + item.title.includes(normalizedSearch) || + item.artist.includes(normalizedSearch) || + item.category.includes(normalizedSearch) ) : charts; @@ -91,16 +94,9 @@ export default function TypingPage() { - + f {user ? ( - <> - - {user.username || user.name} - - { e.preventDefault(); signOut(); }}> - Sign out - - + null ) : ( Sign in )} @@ -130,6 +126,7 @@ export default function TypingPage() { {item.title} {item.artist} + {item.category} diff --git a/src/app/components/sidebar.tsx b/src/app/components/sidebar.tsx index 0185048..37a9176 100644 --- a/src/app/components/sidebar.tsx +++ b/src/app/components/sidebar.tsx @@ -167,7 +167,7 @@ export function Sidebar() {