This commit is contained in:
cdricms
2025-01-15 11:54:39 +01:00
parent d18245736f
commit 683a8c3133
13 changed files with 165 additions and 69 deletions

View File

@@ -1,3 +1,4 @@
"use server";
import { AppSidebar } from "@/components/app-sidebar";
import {
Breadcrumb,
@@ -14,7 +15,7 @@ import {
SidebarTrigger,
} from "@/components/ui/sidebar";
export default function Page() {
export default async function Page() {
return (
<SidebarProvider>
<AppSidebar />

View File

@@ -1,35 +1,7 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "@/app/globals.css";
import Navbar from "@/components/nav-bar";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="fr">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
);
return <>{children}</>;
}

View File

@@ -1,16 +1,14 @@
"use server"
"use server";
export default async function About() {
const res = await fetch("http://localhost:8000/api");
console.log(res);
return (
<div>
<div>
About us
will :
+explain what we
+pricing
+plannign for what will come next
About us will : +explain what we +pricing +plannign for what
will come next
</div>
</div>
)
);
}

View File

@@ -1,23 +1,5 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "@/app/globals.css";
import Navbar from "@/components/nav-bar";
import Footer from "@/components/footer";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
import Navbar from "@/components/nav-bar";
export default function RootLayout({
children,
@@ -25,14 +7,10 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="fr">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<Navbar />
{children}
<Footer />
</body>
</html>
<>
<Navbar />
{children}
<Footer />
</>
);
}

42
frontend/app/layout.tsx Normal file
View File

@@ -0,0 +1,42 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "@/app/globals.css";
import { SWRConfig } from "swr";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<SWRConfig
value={{
fetcher: (url: string) => fetch(url).then((res) => res.json()),
revalidateOnFocus: false,
}}
>
<html lang="fr">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
</SWRConfig>
);
}