Skip to content

Commit 5fafd3a

Browse files
timurictypeofweb
andauthored
Remove nav and footer from checkout (#923)
Co-authored-by: Michal Miszczyszyn <[email protected]>
1 parent bea64a3 commit 5fafd3a

File tree

13 files changed

+33
-11
lines changed

13 files changed

+33
-11
lines changed
File renamed without changes.
File renamed without changes.

src/app/(main)/layout.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { type ReactNode } from "react";
2+
import { Footer } from "@/ui/components/Footer";
3+
import { Nav } from "@/ui/components/Nav";
4+
import { Topbar } from "@/ui/components/Topbar";
5+
6+
export const metadata = {
7+
title: "Saleor Storefront example",
8+
description: "Starter pack for building performant e-commerce experiences with Saleor.",
9+
};
10+
11+
export default function RootLayout(props: { children: ReactNode }) {
12+
return (
13+
<>
14+
<Topbar />
15+
<Nav />
16+
<div className="min-h-[calc(100vh-106px)] flex-grow">{props.children}</div>
17+
<Footer />
18+
</>
19+
);
20+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/app/checkout/layout.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { type ReactNode } from "react";
2+
3+
export const metadata = {
4+
title: "Saleor Storefront example",
5+
description: "Starter pack for building performant e-commerce experiences with Saleor.",
6+
};
7+
8+
export default function RootLayout(props: { children: ReactNode }) {
9+
return <div>{props.children}</div>;
10+
}

src/app/layout.tsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Inter } from "next/font/google";
2-
import { Footer } from "@/ui/components/Footer";
3-
import { Nav } from "@/ui/components/Nav";
42
import "./globals.css";
3+
import { type ReactNode } from "react";
54
import { AuthProvider } from "@/ui/components/AuthProvider";
6-
import { Topbar } from "@/ui/components/Topbar";
75

86
const inter = Inter({ subsets: ["latin"] });
97

@@ -12,17 +10,11 @@ export const metadata = {
1210
description: "Starter pack for building performant e-commerce experiences with Saleor.",
1311
};
1412

15-
export default function RootLayout(props: { children: React.ReactNode; modal: React.ReactNode }) {
13+
export default function RootLayout(props: { children: ReactNode }) {
1614
return (
1715
<html lang="en">
1816
<body className={`${inter.className} flex min-h-screen flex-col`}>
19-
<AuthProvider>
20-
<Topbar />
21-
<Nav />
22-
<div className="min-h-[calc(100vh-106px)] flex-grow">{props.children}</div>
23-
<Footer />
24-
{props.modal}
25-
</AuthProvider>
17+
<AuthProvider>{props.children}</AuthProvider>
2618
</body>
2719
</html>
2820
);

0 commit comments

Comments
 (0)