chore: Remove unused code and dependencies
This commit is contained in:
@@ -22,19 +22,6 @@ const nextConfig = {
|
|||||||
compiler: {
|
compiler: {
|
||||||
styledComponents: true,
|
styledComponents: true,
|
||||||
},
|
},
|
||||||
async headers() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: "/",
|
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
key: "Cache-Control",
|
|
||||||
value: "s-maxage=1, stale-while-revalidate=59",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@@ -1,4 +1,3 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import Footer from "@/components/footer";
|
import Footer from "@/components/footer";
|
||||||
import { Navigation } from "@/components/navigation";
|
import { Navigation } from "@/components/navigation";
|
||||||
@@ -6,10 +5,13 @@ import ReleaseNote from "@/components/release-note";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { releaseNotes } from "@/lib/release-notes";
|
import { releaseNotes } from "@/lib/release-notes";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { redirect, useParams } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
export default function ReleaseNotePage() {
|
export async function generateStaticParams() {
|
||||||
const params = useParams<{ version: string }>();
|
return [{version: "latest"}, ...releaseNotes.map((note) => ({ version: note.version }))];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ReleaseNotePage({ params }: { params: { version: string } }) {
|
||||||
const { version } = params;
|
const { version } = params;
|
||||||
|
|
||||||
if (version === "latest") {
|
if (version === "latest") {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import Footer from "@/components/footer";
|
import Footer from "@/components/footer";
|
||||||
import { Navigation } from "@/components/navigation";
|
import { Navigation } from "@/components/navigation";
|
||||||
import ThemePage from "@/components/theme-page";
|
import ThemePage from "@/components/theme-page";
|
||||||
import { getThemeFromId } from "@/lib/themes";
|
import { getAllThemes, getThemeFromId } from "@/lib/themes";
|
||||||
import { Metadata, ResolvingMetadata } from "next";
|
import { Metadata, ResolvingMetadata } from "next";
|
||||||
|
|
||||||
export async function generateMetadata(
|
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 (
|
return (
|
||||||
<main className="flex min-h-screen flex-col items-center justify-start">
|
<main className="flex min-h-screen flex-col items-center justify-start">
|
||||||
<ThemePage />
|
<ThemePage themeID={theme} />
|
||||||
<Footer />
|
<Footer />
|
||||||
<Navigation /> {/* At the bottom of the page */}
|
<Navigation /> {/* At the bottom of the page */}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -6,11 +6,8 @@ import { useEffect, useState } from "react";
|
|||||||
import Markdown from "react-markdown";
|
import Markdown from "react-markdown";
|
||||||
import '../app/privacy-policy/markdown.css';
|
import '../app/privacy-policy/markdown.css';
|
||||||
import { ChevronLeft, LoaderCircleIcon } from "lucide-react";
|
import { ChevronLeft, LoaderCircleIcon } from "lucide-react";
|
||||||
import { useParams } from "next/navigation";
|
|
||||||
|
|
||||||
export default async function ThemePage() {
|
export default async function ThemePage({ themeID }: { themeID: string }) {
|
||||||
const params = useParams<{ theme: string }>();
|
|
||||||
const { theme: themeID } = params;
|
|
||||||
|
|
||||||
const theme = await getThemeFromId(themeID);
|
const theme = await getThemeFromId(themeID);
|
||||||
if (!theme) {
|
if (!theme) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
interface Fix {
|
interface Fix {
|
||||||
description: string;
|
description: string;
|
||||||
@@ -662,5 +661,6 @@ export const releaseNotes: ReleaseNote[] = [
|
|||||||
].reverse();
|
].reverse();
|
||||||
|
|
||||||
export function releaseNoteIsAlpha(note: ReleaseNote) {
|
export function releaseNoteIsAlpha(note: ReleaseNote) {
|
||||||
|
"use client";
|
||||||
return note.version.includes("-a.");
|
return note.version.includes("-a.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user