diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-10-18 09:21:18 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-10-18 09:21:18 +0000 |
| commit | 0a88ef1da1c04f4d40c0133edb7d27701c7a9746 (patch) | |
| tree | ae3768ba44054d51b1abcc0dcc90d18d4895e412 /src/lib/auth/components/IsAuth.jsx | |
| parent | b4b17e22832a4665042a45030b77c3744fe61534 (diff) | |
| parent | 2a84fb3ce03cfa46cb3c7664e988957e1bd2731b (diff) | |
Merged in CR/UI (pull request #104)
CR/UI
Diffstat (limited to 'src/lib/auth/components/IsAuth.jsx')
| -rw-r--r-- | src/lib/auth/components/IsAuth.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/auth/components/IsAuth.jsx b/src/lib/auth/components/IsAuth.jsx index a32e648c..1948ae0c 100644 --- a/src/lib/auth/components/IsAuth.jsx +++ b/src/lib/auth/components/IsAuth.jsx @@ -8,7 +8,7 @@ const IsAuth = ({ children }) => { useEffect(() => { if (!getAuth() && router.pathname != '/login') { - router.replace(`/login?next=${router.asPath}`) + router.replace(`/login?next=${encodeURIComponent(router.asPath)}`) } else { setResponse(children) } |
