From 7e8f0e3e4051753ec845ad5442e6a5e118bcb2f6 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 12 Mar 2026 00:41:50 -0500 Subject: [PATCH] 's' --- app/vip/components/dashboard/TopicCards.tsx | 32 +++++------ .../components/landing/TopicEbookShowcase.tsx | 55 ++++++++++--------- app/vip/components/landing/TopicEntries.tsx | 30 +++++----- 3 files changed, 59 insertions(+), 58 deletions(-) diff --git a/app/vip/components/dashboard/TopicCards.tsx b/app/vip/components/dashboard/TopicCards.tsx index 7c375eb..fdc6c7e 100644 --- a/app/vip/components/dashboard/TopicCards.tsx +++ b/app/vip/components/dashboard/TopicCards.tsx @@ -4,6 +4,8 @@ import Link from "next/link"; import { TOPICS } from "@/app/data/vip.mock"; import styles from "../vip.module.css"; +type TopicItem = (typeof TOPICS)[number]; + export function TopicCards() { return (
@@ -12,7 +14,8 @@ export function TopicCards() { className={`${styles.topicGrid} animate__animated animate__fadeInUp`} style={{ animationDelay: "0.2s", animationFillMode: "both" }} > - {TOPICS.map((t) => { + {TOPICS.map((t: TopicItem) => { + const { id, href } = t; const content = ( <> {t.icon} @@ -20,21 +23,18 @@ export function TopicCards() { {t.desc} ); - if (t.href) { - return ( - - {content} - - ); - } - return ( -
+ return href ? ( + + {content} + + ) : ( +
{content}
); diff --git a/app/vip/components/landing/TopicEbookShowcase.tsx b/app/vip/components/landing/TopicEbookShowcase.tsx index 834f525..868c353 100644 --- a/app/vip/components/landing/TopicEbookShowcase.tsx +++ b/app/vip/components/landing/TopicEbookShowcase.tsx @@ -18,6 +18,7 @@ export function TopicEbookShowcase({ onLockedClick }: TopicEbookShowcaseProps) { style={{ animationDelay: "0.2s", animationFillMode: "both", marginBottom: "1.5rem" }} > {TOPICS_DISPLAY.map((t) => { + const { id, href } = t; const isLocked = "locked" in t && t.locked && onLockedClick; const content = ( @@ -32,7 +33,7 @@ export function TopicEbookShowcase({ onLockedClick }: TopicEbookShowcaseProps) { if (isLocked) { return (