From c5af19fb80c9df7a7afde5facaac6c2d2e6379f6 Mon Sep 17 00:00:00 2001 From: Zintarh Date: Sat, 30 Nov 2024 14:58:54 +0100 Subject: [PATCH 1/2] chore: fix layout --- frontend/src/app/Home/page.tsx | 10 +++------- frontend/src/app/Home/scan/page.tsx | 13 ------------- frontend/src/app/page.tsx | 13 ++++++------- frontend/src/app/scan/[product]/page.tsx | 5 ++++- 4 files changed, 13 insertions(+), 28 deletions(-) delete mode 100644 frontend/src/app/Home/scan/page.tsx diff --git a/frontend/src/app/Home/page.tsx b/frontend/src/app/Home/page.tsx index 8f7b429..1f4172b 100644 --- a/frontend/src/app/Home/page.tsx +++ b/frontend/src/app/Home/page.tsx @@ -1,15 +1,11 @@ -import Footer from '@/components/Footer'; -import NavBar from '@/components/Navbar'; import React from 'react'; -import ManufacturerPage from '../manufacturer/account/page'; -import HeroSection from '@/components/HeroSection'; -import ContentSection from '@/components/ContentSection'; + const page = () => { return (
- - + {/* + */}
); }; diff --git a/frontend/src/app/Home/scan/page.tsx b/frontend/src/app/Home/scan/page.tsx deleted file mode 100644 index 159ee63..0000000 --- a/frontend/src/app/Home/scan/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import ScanPage from '@/app/scan/[product]/page'; -import ScanButton from '@/components/ScanButton'; -import React from 'react'; - -const page = () => { - return ( -
- -
- ); -}; - -export default page; diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 48c7017..740f47f 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,16 +1,15 @@ 'use client'; import ContentSection from '@/components/ContentSection'; -import Footer from '@/components/Footer'; import HeroSection from '@/components/HeroSection'; -import NavBar from '@/components/Navbar'; import { useRouter } from 'next/navigation'; -import { useEffect } from 'react'; +import Layout from './Home/layout'; export default function Home() { const router = useRouter(); - useEffect(() => { - router.push('/Home'); - }); - return
; + + return + + + } diff --git a/frontend/src/app/scan/[product]/page.tsx b/frontend/src/app/scan/[product]/page.tsx index 6c90bab..e1fe7f0 100644 --- a/frontend/src/app/scan/[product]/page.tsx +++ b/frontend/src/app/scan/[product]/page.tsx @@ -5,6 +5,7 @@ import ScanProduct from '@/components/Scan'; import ConnectModal from '@/components/ConnectModal'; import { useParams } from 'next/navigation'; import ProductPreview from '@/components/ProductPreview'; +import Layout from '@/app/Home/layout'; export default function ScanPage() { const { address } = useAccount(); @@ -25,11 +26,13 @@ export default function ScanPage() { }, [product]); return ( -
+ +
{open && }
+
); } From 30d1d9ff9ab8d46f7160c7539d9e7ce9c9fb855b Mon Sep 17 00:00:00 2001 From: Zintarh Date: Sat, 30 Nov 2024 14:59:56 +0100 Subject: [PATCH 2/2] chore: fix layout --- frontend/src/app/Home/page.tsx | 1 - frontend/src/app/page.tsx | 10 ++++++---- frontend/src/app/scan/[product]/page.tsx | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/Home/page.tsx b/frontend/src/app/Home/page.tsx index 1f4172b..a2fd322 100644 --- a/frontend/src/app/Home/page.tsx +++ b/frontend/src/app/Home/page.tsx @@ -1,6 +1,5 @@ import React from 'react'; - const page = () => { return (
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 740f47f..d886d32 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -8,8 +8,10 @@ import Layout from './Home/layout'; export default function Home() { const router = useRouter(); - return - - - + return ( + + + + + ); } diff --git a/frontend/src/app/scan/[product]/page.tsx b/frontend/src/app/scan/[product]/page.tsx index e1fe7f0..be83c67 100644 --- a/frontend/src/app/scan/[product]/page.tsx +++ b/frontend/src/app/scan/[product]/page.tsx @@ -28,11 +28,11 @@ export default function ScanPage() { return (
- - {open && } + + {open && } - -
+ +
); }