chore: Remove unused code and dependencies
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB |
@@ -1,4 +1,3 @@
|
||||
"use client";
|
||||
|
||||
import Footer from "@/components/footer";
|
||||
import { Navigation } from "@/components/navigation";
|
||||
@@ -6,10 +5,13 @@ import ReleaseNote from "@/components/release-note";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { releaseNotes } from "@/lib/release-notes";
|
||||
import Link from "next/link";
|
||||
import { redirect, useParams } from "next/navigation";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function ReleaseNotePage() {
|
||||
const params = useParams<{ version: string }>();
|
||||
export async function generateStaticParams() {
|
||||
return [{version: "latest"}, ...releaseNotes.map((note) => ({ version: note.version }))];
|
||||
}
|
||||
|
||||
export default function ReleaseNotePage({ params }: { params: { version: string } }) {
|
||||
const { version } = params;
|
||||
|
||||
if (version === "latest") {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user