Skip to content

Commit

Permalink
redirect error solved on login and register page for dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Md-Rubel-Ahmed-Rana committed Jul 3, 2024
1 parent 8f42b28 commit bb03048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const LoginPage: NextPageWithLayout = () => {
const handleAuth = async () => {
setLoading(true);
const isLoggedIn = Cookies.get("tmAccessToken");
if (isLoggedIn) {
if (isLoggedIn !== "undefined") {
setLoading(false);
return router.push("/dashboard");
} else {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const SignupPage: NextPageWithLayout = () => {
const handleAuth = async () => {
setLoading(true);
const isLoggedIn = Cookies.get("tmAccessToken");
if (isLoggedIn) {
if (isLoggedIn !== "undefined") {
setLoading(false);
return router.push("/dashboard");
} else {
Expand Down

0 comments on commit bb03048

Please sign in to comment.