Skip to content

Let's use AI to Earn!

报错

daoyianddecf6eae600
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
new file mode 100644
index 00000000..2ca0a017
--- /dev/null
+++ b/src/app/layout.tsx
@@ -0,0 +1,21 @@
+import "@/var.css";
+import "./globals.css";
+import { Providers } from "./layout/Providers";
+import { dir } from "i18next";
+import { languages, fallbackLng } from "@/app/i18n/settings";
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+ <html lang={fallbackLng} dir={dir(fallbackLng)}>
+ <body>
+ <Providers lng={fallbackLng}>
+ {children}
+ </Providers>
+ </body>
+ </html>
+ );
+}
\ No newline at end of file
diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx
index c95bee1f..da7ba1eb 100644
--- a/src/app/not-found.tsx
+++ b/src/app/not-found.tsx
@@ -1,8 +1,11 @@
"use client";
import Link from "next/link";
+import { useGetClientLng } from "@/hooks/useSystem";
+
+export default function NotFound() {
+ const lng = useGetClientLng();
-export default function Page() {
return (
<div
style={{
@@ -10,12 +13,33 @@ export default function Page() {
justifyContent: "center",
alignItems: "center",
flexDirection: "column",
- height: "100vh",
+ minHeight: "100vh",
+ background: "var(--background-color)",
+ color: "var(--text-color)",
}}
>
- <span style={{ fontSize: "60px" }}>404</span>
- <Link href="/" style={{ marginTop: "20px" }}>
- Back to Home
+ <span style={{ fontSize: "60px", color: "var(--theColor5)" }}>404</span>
+ <Link
+ href={`/${lng}`}
+ style={{
+ marginTop: "20px",
+ color: "var(--theColor5)",
+ textDecoration: "none",
+ padding: "8px 16px",
+ border: "1px solid var(--theColor5)",
+ borderRadius: "8px",
+ transition: "all 0.3s"
+ }}
+ onMouseOver={(e) => {
+ e.currentTarget.style.background = "var(--theColor5)";
+ e.currentTarget.style.color = "white";
+ }}
+ onMouseOut={(e) => {
+ e.currentTarget.style.background = "transparent";
+ e.currentTarget.style.color = "var(--theColor5)";
+ }}
+ >
+ 返回首页
</Link>
</div>
);