2026-08-07 07:42:14 +00:00
|
|
|
|
2026-08-21 05:13:19 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { SellerProvider, useSeller } from './context/SellerContext';
|
|
|
|
|
import Header from './components/layout/Header';
|
|
|
|
|
import Footer from './components/layout/Footer';
|
|
|
|
|
import LandingPage from './components/pages/LandingPage';
|
|
|
|
|
import AboutPage from './components/pages/AboutPage';
|
|
|
|
|
import ContactPage from './components/pages/ContactPage';
|
|
|
|
|
import AuthForms from './components/pages/AuthForms';
|
|
|
|
|
import OnboardingWizard from './components/pages/OnboardingWizard';
|
|
|
|
|
import DashboardLayout from './components/dashboard/DashboardLayout';
|
2026-08-08 07:46:17 +00:00
|
|
|
|
2026-08-21 05:13:19 +00:00
|
|
|
function AppRouter() {
|
|
|
|
|
const { currentPage } = useSeller();
|
2026-08-18 06:00:45 +00:00
|
|
|
|
2026-08-21 05:13:19 +00:00
|
|
|
if (currentPage === 'dashboard') {
|
|
|
|
|
return <DashboardLayout />;
|
2026-08-08 07:46:17 +00:00
|
|
|
}
|
|
|
|
|
|
2026-09-09 16:53:40 +00:00
|
|
|
if (currentPage === 'home') {
|
|
|
|
|
return <LandingPage />;
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-07 07:42:14 +00:00
|
|
|
return (
|
2026-08-21 05:13:19 +00:00
|
|
|
<div className="is-flex is-flex-direction-column" style={{ minHeight: '100vh' }}>
|
|
|
|
|
<Header />
|
|
|
|
|
<main className="is-flex-grow-1">
|
|
|
|
|
{currentPage === 'profile-completion' && <OnboardingWizard />}
|
|
|
|
|
{currentPage === 'about' && <AboutPage />}
|
|
|
|
|
{currentPage === 'contact' && <ContactPage />}
|
|
|
|
|
{(currentPage === 'login' || currentPage === 'signup') && <AuthForms />}
|
|
|
|
|
</main>
|
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2026-08-07 07:42:14 +00:00
|
|
|
}
|
2026-08-09 05:29:03 +00:00
|
|
|
|
2026-08-21 05:13:19 +00:00
|
|
|
export default function App() {
|
2026-08-09 05:29:03 +00:00
|
|
|
return (
|
2026-08-21 05:13:19 +00:00
|
|
|
<SellerProvider>
|
|
|
|
|
<AppRouter />
|
|
|
|
|
</SellerProvider>
|
|
|
|
|
);
|
2026-08-09 05:29:03 +00:00
|
|
|
}
|