diff --git a/app/[locale]/(main)/layout.tsx b/app/[locale]/(main)/layout.tsx index 15a5617..137532e 100644 --- a/app/[locale]/(main)/layout.tsx +++ b/app/[locale]/(main)/layout.tsx @@ -1,36 +1,6 @@ - import React from "react"; import Header from "@/app/[locale]/(main)/header"; import Footer from "./footer"; -import type { Metadata } from "next"; -import { Inter as FontSans } from "next/font/google"; -import { ThemeProvider } from "next-themes"; -import { Viewport } from "next"; -import { cn } from "@/lib/utils"; -import { PublicEnvScript } from "next-runtime-env"; - -const fontSans = FontSans({ - subsets: ["latin"], - variable: "--font-sans", -}); - -export const metadata: Metadata = { - manifest: "/manifest.json", - title: "NezhaDash", - description: "A dashboard for nezha", - appleWebApp: { - capable: true, - title: "NezhaDash", - statusBarStyle: "black-translucent", - }, -}; - -export const viewport: Viewport = { - width: "device-width", - initialScale: 1, - maximumScale: 1, - userScalable: false, -}; type DashboardProps = { children: React.ReactNode; diff --git a/bun.lockb b/bun.lockb index 5e3d148..0667cb3 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/LanguageSwitcher.tsx b/components/LanguageSwitcher.tsx index f762c66..8ef414a 100644 --- a/components/LanguageSwitcher.tsx +++ b/components/LanguageSwitcher.tsx @@ -40,10 +40,10 @@ export function LanguageSwitcher() { pathname === currentLocalePath || pathname === `${currentLocalePath}/` ) { - router.push(newLocalePath); + router.replace(newLocalePath); } else { const newPath = constructLocalePath(pathname, newLocale); - router.push(newPath); + router.replace(newPath); } router.refresh(); }; diff --git a/next.config.mjs b/next.config.mjs index 03f58d8..5234c22 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -14,7 +14,7 @@ const withPWA = withPWAInit({ /** @type {import('next').NextConfig} */ const nextConfig = { - // output: "standalone", + output: "standalone", reactStrictMode: true, }; export default withPWA(withNextIntl(nextConfig)); diff --git a/package.json b/package.json index 9849a1b..0f6a9e7 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@radix-ui/react-tooltip": "^1.1.2", "@types/luxon": "^3.4.2", "@typescript-eslint/eslint-plugin": "^7.18.0", - "caniuse-lite": "^1.0.30001663", + "caniuse-lite": "^1.0.30001664", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "country-flag-icons": "^1.5.13", @@ -47,7 +47,7 @@ "eslint-plugin-turbo": "^2.1.2", "eslint-plugin-unused-imports": "^4.1.4", "@next/bundle-analyzer": "^14.2.13", - "@types/node": "^22.7.0", + "@types/node": "^22.7.2", "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", "autoprefixer": "^10.4.20",