Skip to content

Commit ac2b1de

Browse files
Copilothuangyiirene
andcommitted
Improve code quality: simplify homepage card logic and add keyboard accessibility
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 7858a1d commit ac2b1de

1 file changed

Lines changed: 26 additions & 31 deletions

File tree

apps/site/app/page.tsx

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -243,39 +243,34 @@ export default function HomePage() {
243243

244244
<div className="mx-auto grid max-w-6xl grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
245245
{[
246-
{ icon: "📊", title: "Dashboards", desc: "Data visualization and analytics", link: null },
247-
{ icon: "⚙️", title: "Admin Panels", desc: "Complete CRUD interfaces", link: null },
248-
{ icon: "📝", title: "Forms", desc: "Complex multi-step forms", link: null },
249-
{ icon: "📄", title: "CMS", desc: "Content management systems", link: null },
250-
{ icon: "🔧", title: "Internal Tools", desc: "Business applications", link: null },
251-
{ icon: "✨", title: "Interactive Examples", desc: "Explore 30+ components with live demos", link: "/docs/guide/interactive-demos" }
246+
{ icon: "📊", title: "Dashboards", desc: "Data visualization and analytics" },
247+
{ icon: "⚙️", title: "Admin Panels", desc: "Complete CRUD interfaces" },
248+
{ icon: "📝", title: "Forms", desc: "Complex multi-step forms" },
249+
{ icon: "📄", title: "CMS", desc: "Content management systems" },
250+
{ icon: "🔧", title: "Internal Tools", desc: "Business applications" },
252251
].map((useCase) => (
253-
useCase.link ? (
254-
<Link
255-
key={useCase.title}
256-
href={useCase.link}
257-
className="rounded-xl border border-fd-border bg-fd-card p-6 transition-all hover:shadow-lg hover:border-fd-primary/50"
258-
>
259-
<div className="text-4xl mb-3">{useCase.icon}</div>
260-
<h3 className="text-lg font-semibold text-fd-foreground mb-1">
261-
{useCase.title}
262-
</h3>
263-
<p className="text-fd-muted-foreground text-sm">
264-
{useCase.desc}
265-
</p>
266-
</Link>
267-
) : (
268-
<div key={useCase.title} className="rounded-xl border border-fd-border bg-fd-card p-6">
269-
<div className="text-4xl mb-3">{useCase.icon}</div>
270-
<h3 className="text-lg font-semibold text-fd-foreground mb-1">
271-
{useCase.title}
272-
</h3>
273-
<p className="text-fd-muted-foreground text-sm">
274-
{useCase.desc}
275-
</p>
276-
</div>
277-
)
252+
<div key={useCase.title} className="rounded-xl border border-fd-border bg-fd-card p-6">
253+
<div className="text-4xl mb-3">{useCase.icon}</div>
254+
<h3 className="text-lg font-semibold text-fd-foreground mb-1">
255+
{useCase.title}
256+
</h3>
257+
<p className="text-fd-muted-foreground text-sm">
258+
{useCase.desc}
259+
</p>
260+
</div>
278261
))}
262+
<Link
263+
href="/docs/guide/interactive-demos"
264+
className="rounded-xl border border-fd-border bg-fd-card p-6 transition-all hover:shadow-lg hover:border-fd-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-primary focus-visible:ring-offset-2"
265+
>
266+
<div className="text-4xl mb-3"></div>
267+
<h3 className="text-lg font-semibold text-fd-foreground mb-1">
268+
Interactive Examples
269+
</h3>
270+
<p className="text-fd-muted-foreground text-sm">
271+
Explore 30+ components with live demos
272+
</p>
273+
</Link>
279274
</div>
280275
</div>
281276
</section>

0 commit comments

Comments
 (0)