chore: Remove unused code and dependencies
This commit is contained in:
@@ -22,19 +22,6 @@ const nextConfig = {
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
},
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: "/",
|
||||
headers: [
|
||||
{
|
||||
key: "Cache-Control",
|
||||
value: "s-maxage=1, stale-while-revalidate=59",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
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 { 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>
|
||||
|
||||
@@ -6,11 +6,8 @@ import { useEffect, useState } from "react";
|
||||
import Markdown from "react-markdown";
|
||||
import '../app/privacy-policy/markdown.css';
|
||||
import { ChevronLeft, LoaderCircleIcon } from "lucide-react";
|
||||
import { useParams } from "next/navigation";
|
||||
|
||||
export default async function ThemePage() {
|
||||
const params = useParams<{ theme: string }>();
|
||||
const { theme: themeID } = params;
|
||||
export default async function ThemePage({ themeID }: { themeID: string }) {
|
||||
|
||||
const theme = await getThemeFromId(themeID);
|
||||
if (!theme) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
"use client";
|
||||
|
||||
interface Fix {
|
||||
description: string;
|
||||
@@ -662,5 +661,6 @@ export const releaseNotes: ReleaseNote[] = [
|
||||
].reverse();
|
||||
|
||||
export function releaseNoteIsAlpha(note: ReleaseNote) {
|
||||
"use client";
|
||||
return note.version.includes("-a.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user