chore: Remove unused code and dependencies

This commit is contained in:
mauro-balades
2024-08-27 16:31:58 +02:00
parent a76e74c0e7
commit a3cf78d83a
6 changed files with 19 additions and 25 deletions

View File

@@ -2,7 +2,7 @@
import Footer from "@/components/footer";
import { Navigation } from "@/components/navigation";
import ThemePage from "@/components/theme-page";
import { getThemeFromId } from "@/lib/themes";
import { getAllThemes, getThemeFromId } from "@/lib/themes";
import { Metadata, ResolvingMetadata } from "next";
export async function generateMetadata(
@@ -36,10 +36,18 @@ export async function generateMetadata(
};
}
export default async function ThemeInfoPage() {
export async function generateStaticParams() {
const themes = await getAllThemes();
return themes.map((theme) => ({
theme: theme.id,
}));
}
export default async function ThemeInfoPage({ params }: { params: { theme: string } }) {
const { theme } = params;
return (
<main className="flex min-h-screen flex-col items-center justify-start">
<ThemePage />
<ThemePage themeID={theme} />
<Footer />
<Navigation /> {/* At the bottom of the page */}
</main>