chore: Update ThemeCard component to open theme page on click
This commit is contained in:
24
src/app/themes/[theme]/page.tsx
Normal file
24
src/app/themes/[theme]/page.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
"use client";
|
||||
import Footer from "@/components/footer";
|
||||
import { Navigation } from "@/components/navigation";
|
||||
import ThemePage from "@/components/theme-page";
|
||||
import { getThemeFromId } from "@/lib/themes";
|
||||
import { useParams } from "next/navigation";
|
||||
|
||||
export default function ThemeInfoPage() {
|
||||
const params = useParams<{ theme: string }>();
|
||||
const { theme: themeID } = params;
|
||||
|
||||
const theme = getThemeFromId(themeID);
|
||||
if (!theme) {
|
||||
return <div>Theme not found</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center justify-start">
|
||||
<ThemePage theme={theme} />
|
||||
<Footer />
|
||||
<Navigation /> {/* At the bottom of the page */}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user