diff --git a/src/views/common/AdminPageWrapper.tsx b/src/views/common/AdminPageWrapper.tsx index f926ebb..5406e62 100644 --- a/src/views/common/AdminPageWrapper.tsx +++ b/src/views/common/AdminPageWrapper.tsx @@ -64,10 +64,10 @@ const AdminPageWrapper: React.FC = ({ requiresAuthentication, childre const router = useRouter(); const { completed, redirecting } = useShouldRedirect(requiresAuthentication); - const { pathname } = router; + const { asPath } = router; if (redirecting) { - const loginURL = `/admin/login?next=${pathname}`; + const loginURL = `/admin/login?next=${asPath}`; router.push(loginURL); } @@ -79,7 +79,7 @@ const AdminPageWrapper: React.FC = ({ requiresAuthentication, childre <>
- + {children}