mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
fixed layout to all app pages. updated product page to use api/products
This commit is contained in:
16
src/app/Brands/layout.tsx
Normal file
16
src/app/Brands/layout.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export const metadata = {
|
||||||
|
title: 'Next.js',
|
||||||
|
description: 'Generated by Next.js',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<html lang="en">
|
||||||
|
<body>{children}</body>
|
||||||
|
</html>
|
||||||
|
)
|
||||||
|
}
|
||||||
16
src/app/Builder/layout.tsx
Normal file
16
src/app/Builder/layout.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export const metadata = {
|
||||||
|
title: 'Next.js',
|
||||||
|
description: 'Generated by Next.js',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<html lang="en">
|
||||||
|
<body>{children}</body>
|
||||||
|
</html>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
// app/builder/page.js
|
|
||||||
|
|
||||||
export default function BuilderPage() {
|
export default function BuilderPage() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>About Us</h1>
|
<h1>About Us</h1>
|
||||||
<p>This is the about page.</p>
|
<p>This is the about page.</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import { Provider } from "../components/ui/provider"
|
import { Provider } from "../components/ui/provider"
|
||||||
import "../styles/globals.css";
|
import "../styles/globals.css";
|
||||||
|
import Navbar from "../components/Navbar";
|
||||||
|
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: 'Ballistic Builder',
|
title: 'Ballistic Builder',
|
||||||
description: 'Freedom On',
|
description: 'Freedom On',
|
||||||
@@ -11,7 +14,9 @@ export default function RootLayout(props: { children: React.ReactNode }) {
|
|||||||
return (
|
return (
|
||||||
<html suppressHydrationWarning>
|
<html suppressHydrationWarning>
|
||||||
<body>
|
<body>
|
||||||
<Provider>{children}</Provider>
|
<Provider>
|
||||||
|
<Navbar />
|
||||||
|
{children}</Provider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default function Products() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchProducts() {
|
async function fetchProducts() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://api.example.com/products");
|
const response = await fetch("/api/products");
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setProducts(data);
|
setProducts(data);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user