Skip to content

Commit

Permalink
dashboard route bug fix issue##830
Browse files Browse the repository at this point in the history
  • Loading branch information
SwayamRana808 committed May 13, 2024
1 parent 6494707 commit 1bfe01f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions frontend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
BrowserRouter as Router,
Switch,
Route,
Redirect,
useLocation,
} from "react-router-dom";
import { SimpleToast } from "../src/components/util/Toast/index";
Expand Down Expand Up @@ -30,7 +31,7 @@ import { Setting } from "./pages/Admin/Components/Setting";
import { PrivacyPolicy } from "./pages/PrivacyPolicy/index";
import { Resources } from "./pages/Resources/index";
import { Faq } from "./pages/Faq";
import Ques from "./pages/Q&A/Q&A.jsx"
import Ques from "./pages/Q&A/Q&A.jsx";
import { Broadcast } from "./pages/Broadcast/index";
import { AllBroadcasts } from "./pages/Broadcast/Component/AllBroadcasts/index";
import { GetInvolved } from "./pages/GetInvolved";
Expand Down Expand Up @@ -81,7 +82,13 @@ const App = () => {
path="/dashboard"
render={() => <Admin theme={theme} />}
/>
) : null}
) : (
<Route
exact={true}
path="/dashboard"
render={() => <Redirect to="/admin" />}
/>
)}
<div>
<Navbar handleClick={toggleTheme} theme={theme} />
<Switch>
Expand Down

0 comments on commit 1bfe01f

Please sign in to comment.