From a7e6b093f70d7f78b5662e4c913d78417f6324e2 Mon Sep 17 00:00:00 2001 From: przeq piciel Date: Mon, 9 Sep 2024 15:33:02 +0000 Subject: [PATCH] chore: move navigation bar to layout from each page file --- app/app/files/page.tsx | 2 -- app/app/layout.tsx | 7 ++++++- app/components/ConsoleNavigation/index.tsx | 2 ++ app/components/WebConsole/index.tsx | 2 -- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/app/files/page.tsx b/app/app/files/page.tsx index 8a105a1..22ecef4 100644 --- a/app/app/files/page.tsx +++ b/app/app/files/page.tsx @@ -1,10 +1,8 @@ import FilesEdit from "@/components/FilesEditor"; -import ConsoleNavigation from "@/components/ConsoleNavigation"; export default function Files() { return ( <> -
diff --git a/app/app/layout.tsx b/app/app/layout.tsx index 3f697da..17f6b5e 100644 --- a/app/app/layout.tsx +++ b/app/app/layout.tsx @@ -1,6 +1,8 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./globals.css"; +import { Console } from "console"; +import ConsoleNavigation from "@/components/ConsoleNavigation"; const inter = Inter({ subsets: ["latin"] }); @@ -20,7 +22,10 @@ export default function RootLayout({

-
{children}
+
+ + {children} +
); diff --git a/app/components/ConsoleNavigation/index.tsx b/app/components/ConsoleNavigation/index.tsx index d0a6c28..1443046 100644 --- a/app/components/ConsoleNavigation/index.tsx +++ b/app/components/ConsoleNavigation/index.tsx @@ -1,3 +1,5 @@ +"use client"; + import Link from "next/link"; import React from "react"; diff --git a/app/components/WebConsole/index.tsx b/app/components/WebConsole/index.tsx index f4a6ccf..4dfd7a4 100644 --- a/app/components/WebConsole/index.tsx +++ b/app/components/WebConsole/index.tsx @@ -6,7 +6,6 @@ import Stats from "./stats"; import ServerName from "./serverName"; import ServerControl from "./serverControl"; import ServerStatus from "./serverStatus"; -import Navigation from "../ConsoleNavigation"; const Console = () => { const [apiKey, setApiKey] = useState(""); @@ -157,7 +156,6 @@ const Console = () => { return ( <> -