Browse Source

fix: 修改layout

Before 9 months ago
parent
commit
e0be6785b4

+ 12 - 18
src/app/[locale]/(TabBar)/(ordinary)/deposit/layout.tsx

@@ -1,22 +1,16 @@
-import Header from "@/components/Header";
-import { FC, PropsWithChildren } from "react";
-type Props = {};
-
-// export const generateMetadata = (props: any) => {
-//     console.log(`🚀🚀🚀🚀🚀-> in layout.tsx on 6`, props);
-//     return {
-//         title: "Sport",
-//     };
-// };
-const Layout: FC<PropsWithChildren<Props>> = (props) => {
-    const { children } = props;
-
+import HeaderBack from "@/components/HeaderBack";
+import { ReactNode } from "react";
+export default async function LocaleLayout({
+    children,
+    params: { locale },
+}: {
+    children: ReactNode;
+    params: { locale: string };
+}) {
     return (
         <>
-            <Header visibleLanguage={false} />
-            <main className={"main-footer-header"}>{children}</main>
+            <HeaderBack showBack={true} />
+            <main className={"main-footer-header bg-[#1f1f1f]"}>{children}</main>
         </>
     );
-};
-
-export default Layout;
+}

+ 12 - 18
src/app/[locale]/(TabBar)/(ordinary)/gameList/layout.tsx

@@ -1,22 +1,16 @@
-import Header from "@/components/Header";
-import { FC, PropsWithChildren } from "react";
-type Props = {};
-
-// export const generateMetadata = (props: any) => {
-//     console.log(`🚀🚀🚀🚀🚀-> in layout.tsx on 6`, props);
-//     return {
-//         title: "Sport",
-//     };
-// };
-const Layout: FC<PropsWithChildren<Props>> = (props) => {
-    const { children } = props;
-
+import HeaderBack from "@/components/HeaderBack";
+import { ReactNode } from "react";
+export default async function LocaleLayout({
+    children,
+    params: { locale },
+}: {
+    children: ReactNode;
+    params: { locale: string };
+}) {
     return (
         <>
-            <Header visibleLanguage={false} />
-            <main className={"main-footer-header"}>{children}</main>
+            <HeaderBack showBack={true} />
+            <main className={"main-footer-header bg-[#1f1f1f]"}>{children}</main>
         </>
     );
-};
-
-export default Layout;
+}

+ 0 - 11
src/app/[locale]/(TabBar)/(ordinary)/info/page.tsx

@@ -1,11 +0,0 @@
-import { FC } from "react";
-export function generateStaticParams() {
-    return [{ slug: [""] }];
-}
-interface Props {}
-
-const Info: FC<Props> = (props) => {
-    return <div>hello Info</div>;
-};
-
-export default Info;

+ 0 - 11
src/app/[locale]/(TabBar)/(ordinary)/project/page.tsx

@@ -1,11 +0,0 @@
-import { FC } from "react";
-
-interface Props {}
-export function generateStaticParams() {
-    return [{ slug: [""] }];
-}
-const App: FC<Props> = (props) => {
-    return <div>hello Project</div>;
-};
-
-export default App;

+ 0 - 7
src/app/[locale]/(TabBar)/(ordinary)/layout.tsx → src/app/[locale]/(TabBar)/sports/layout.tsx

@@ -1,13 +1,6 @@
 import Header from "@/components/Header";
 import { FC, PropsWithChildren } from "react";
 type Props = {};
-
-// export const generateMetadata = (props: any) => {
-//     console.log(`🚀🚀🚀🚀🚀-> in layout.tsx on 6`, props);
-//     return {
-//         title: "Sport",
-//     };
-// };
 const Layout: FC<PropsWithChildren<Props>> = (props) => {
     const { children } = props;