Skip to content

Commit

Permalink
Merge pull request #300 from AkshataKatwal16/relese-changes
Browse files Browse the repository at this point in the history
Issue bug:Fix without token access page issue
  • Loading branch information
itsvick authored Nov 7, 2024
2 parents 69c570e + 31148e3 commit d4f3fd4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ function App({ Component, pageProps }: AppProps) {
telemetryFactory.init();
}, []);


useEffect(() => {
const token = localStorage.getItem("token");
if (!token && (router.pathname !== "/login")) {
if((router.pathname !== "/logout"))
router.push("/logout");
}

}, [router]);
useEffect(() => {
// Initialize GA only once
if (!window.GA_INITIALIZED) {
Expand Down

0 comments on commit d4f3fd4

Please sign in to comment.