Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.app {
min-height: 100vh;
width: 100%;
overflow-x: hidden;
}

.app-container {
Expand Down Expand Up @@ -92,4 +91,4 @@

table {
min-width: 100%;
}
}
134 changes: 67 additions & 67 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const App = () => {
location.pathname === "/dashboard" ||
location.pathname === "/leaderboard" ||
location.pathname === "/market-overview" ||
location.pathname === "/change-password" ;
location.pathname === "/change-password";

const authRoutes = ["/login", "/signup", "/forgot-password"];
const isAuthPage = authRoutes.includes(location.pathname);
Expand All @@ -84,89 +84,89 @@ const App = () => {
<Toaster
position="top-center"
toastOptions={{
className: "theme-toaster",
style: {
background: "rgba(15, 15, 25, 0.9)",
color: "#fff",
background: "var(--glass-panel-bg)",
color: "var(--text-main)",
backdropFilter: "blur(12px)",
border: "1px solid rgba(139, 92, 246, 0.3)",
border: "1px solid var(--border-color)",
borderRadius: "12px",
},
success: {
iconTheme: {
primary: "#22c55e",
secondary: "#0f0f19",
secondary: "var(--bg-deep)",
},
},
error: {
iconTheme: {
primary: "#ef4444",
secondary: "#0f0f19",
secondary: "var(--bg-deep)",
},
},
}}
/>
<ThemeProvider>
<AuthProvider>
<div className="app">
{/* Loading Spinner - will show when isLoading is true */}
{isLoading && !isDashboard && <LoadingSpinner />}

<div
className={
isDashboard ? "app-dashboard-container" : "app-container"
}
>
{!isDashboard && <Navbar />}
<Routes>
<Route path="/" element={<Home />} />
<Route path="/pricing" element={<Pricing />} />
<Route path="/blog" element={<Blog />} />
{/* Blog detail route supporting both slug and id patterns */}
<Route path="/blog/:slug" element={<BlogDetail />} />
<Route path="/blog/article/:id" element={<BlogDetail />} />

<Route path="/features" element={<Features />} />
<Route path="/signup" element={<Signup />} />
<Route path="/login" element={<Login />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/contributors" element={<Contributors />} />

{/* Dashboard Layout with nested routes - all share the same sidebar */}
<Route
element={
<PrivateRoute>
<DashboardLayout />
</PrivateRoute>
}
>
<Route path="/dashboard" element={<DashboardContent />} />
<Route path="/market-overview" element={<MarketOverview />} />
<Route path="/leaderboard" element={<Leaderboard />} />
<Route path="/change-password" element={<ChangePassword />} />
</Route>

{/* Coin route - accessible to all but shows sidebar if logged in */}
<Route path="/coin/:coinId" element={<CoinWrapper />} />

{/* Add 404 Route if you implemented it earlier */}
{/* <Route path="*" element={<NotFound />} /> */}

<Route path="/privacy" element={<PrivacyPolicy />} />
<Route path="/terms" element={<TermsOfService />} />
<Route path="/contactus" element={<ContactUs />} />
<Route path="/faq" element={<FAQ />} />

{/* Page Not Found */}
<Route path="*" element={<PageNotFound />} />



<Route path="/cookies" element={<CookiePolicy />} />
</Routes>
</div>
{!isDashboard && !isAuthPage && <Footer />}
<AuthProvider>
<div className="app">
{/* Loading Spinner - will show when isLoading is true */}
{isLoading && !isDashboard && <LoadingSpinner />}

<div
className={
isDashboard ? "app-dashboard-container" : "app-container"
}
>
{!isDashboard && <Navbar />}
<Routes>
<Route path="/" element={<Home />} />
<Route path="/pricing" element={<Pricing />} />
<Route path="/blog" element={<Blog />} />
{/* Blog detail route supporting both slug and id patterns */}
<Route path="/blog/:slug" element={<BlogDetail />} />
<Route path="/blog/article/:id" element={<BlogDetail />} />

<Route path="/features" element={<Features />} />
<Route path="/signup" element={<Signup />} />
<Route path="/login" element={<Login />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/contributors" element={<Contributors />} />

{/* Dashboard Layout with nested routes - all share the same sidebar */}
<Route
element={
<PrivateRoute>
<DashboardLayout />
</PrivateRoute>
}
>
<Route path="/dashboard" element={<DashboardContent />} />
<Route path="/market-overview" element={<MarketOverview />} />
<Route path="/leaderboard" element={<Leaderboard />} />
<Route path="/change-password" element={<ChangePassword />} />
</Route>

{/* Coin route - accessible to all but shows sidebar if logged in */}
<Route path="/coin/:coinId" element={<CoinWrapper />} />

{/* Add 404 Route if you implemented it earlier */}
{/* <Route path="*" element={<NotFound />} /> */}

<Route path="/privacy" element={<PrivacyPolicy />} />
<Route path="/terms" element={<TermsOfService />} />
<Route path="/contactus" element={<ContactUs />} />
<Route path="/faq" element={<FAQ />} />

{/* Page Not Found */}
<Route path="*" element={<PageNotFound />} />



<Route path="/cookies" element={<CookiePolicy />} />
</Routes>
</div>
<ScrollToTop lenis={lenisRef.current} />
{!isDashboard && !isAuthPage && <Footer />}
</div>
<ScrollToTop lenis={lenisRef.current} />
</AuthProvider>
</ThemeProvider>
</>
Expand Down
Loading