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
13 changes: 8 additions & 5 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import React from "react";

Check warning on line 1 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'React' is defined but never used
import {
BrowserRouter as Router,

Check warning on line 3 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Router' is defined but never used
Routes,

Check warning on line 4 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Routes' is defined but never used
Route,

Check warning on line 5 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Route' is defined but never used
Navigate,

Check warning on line 6 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Navigate' is defined but never used
useLocation,
} from "react-router-dom";
import Navbar from "./components/Navbar";

Check warning on line 9 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Navbar' is defined but never used
import Login from "./pages/Login";

Check warning on line 10 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Login' is defined but never used
import Signup from "./pages/Signup";

Check warning on line 11 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Signup' is defined but never used
import Whiteboard from "./components/Whiteboard";

Check warning on line 12 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Whiteboard' is defined but never used
import Dashboard from "./pages/Dashboard";

Check warning on line 13 in client/src/App.jsx

View workflow job for this annotation

GitHub Actions / Frontend CI

'Dashboard' is defined but never used
import LandingPage from "./pages/LandingPage";
import FeaturesPage from "./pages/FeaturesPage";
import AboutPage from "./pages/AboutPage";
import ContactPage from "./pages/ContactPage";
import FAQPage from "./pages/FAQPage"; // FIX 1: Import add kiya
import VerificationPending from "./pages/VerificationPending";
import AdminPanel from "./pages/AdminPanel";
import ForgotPassword from "./pages/ForgotPassword";
Expand All @@ -36,7 +37,7 @@
return <Navigate to="/login" state={{ from: location.pathname }} />;
}

if (user.role === 'admin' && location.pathname === '/dashboard') {
if (user.role === "admin" && location.pathname === "/dashboard") {
return <Navigate to="/admin" />;
}

Expand All @@ -49,7 +50,7 @@

if (token) {
if (user.isVerified) {
if (user.role === 'admin') {
if (user.role === "admin") {
return <Navigate to="/admin" />;
}
return <Navigate to="/dashboard" />;
Expand Down Expand Up @@ -97,8 +98,12 @@
<Route path="/" element={<LandingPage />} />
<Route path="/features" element={<FeaturesPage />} />
<Route path="/about" element={<AboutPage />} />

<Route path="/contact" element={<ContactPage />} />
{/* FIX 2: /faq route add kiya, duplicate /contact remove kiya */}
<Route path="/faq" element={<FAQPage />} />
<Route path="/terms" element={<TermsOfService />} />
<Route path="/privacy-policy" element={<PrivacyPolicy />} />


<Route
path="/terms-of-service"
Expand Down Expand Up @@ -194,8 +199,6 @@
/>

<Route path="*" element={<NotFound />} />


</Routes>
</div>
</div>
Expand Down
Loading
Loading