Skip to content

Commit

Permalink
revised dashboard navigation to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
acao22 committed Jul 19, 2024
1 parent 900d99b commit 08f63c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Route,
useLocation,
useSearchParams,
useNavigate
} from "react-router-dom";

import { useAppSelector, useAppDispatch } from "./redux/hooks";
Expand Down Expand Up @@ -57,6 +58,7 @@ const App = () => {
const urlParams = useAppSelector((state) => state.urlslice.urlParams);

const dispatch = useAppDispatch();
const navigate = useNavigate();

useEffect(() => {
const verify_token = async () => {
Expand Down Expand Up @@ -108,6 +110,7 @@ const App = () => {
surveySession: res.data.sessionId,
})
);
navigate("/dashboard");
} else {
alert(res.data.message);
}
Expand Down

0 comments on commit 08f63c8

Please sign in to comment.