summaryrefslogtreecommitdiff
path: root/src/lib/auth/components
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-10-16 11:16:33 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-10-16 11:16:57 +0700
commit6aa5fa70cf5ccd2825e5657ec1a90e370dea3bcf (patch)
treeea0472ba64ce6f40db8019400a72915202f0e995 /src/lib/auth/components
parent43e59b8c7f8b742e5781a8a8b991afcf9aabb90e (diff)
Fix buy action before and after login
Diffstat (limited to 'src/lib/auth/components')
-rw-r--r--src/lib/auth/components/IsAuth.jsx2
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)
}