diff --git a/src/app/dmag/components/CreateReview.tsx b/src/app/dmag/components/CreateReview.tsx index a213d36..8847519 100644 --- a/src/app/dmag/components/CreateReview.tsx +++ b/src/app/dmag/components/CreateReview.tsx @@ -39,7 +39,7 @@ const CreateReview: FC = ({ refetch, id }) => { }, onError: (error: ErrorType) => { if (error.response && 'status' in error.response && error.response.status === 401) { - window.location.href = LOGIN_URL + '?redirect=' + window.location.href + window.location.href = LOGIN_URL } else { toast(error.response?.data?.error?.message?.[0] || 'An error occurred', 'error') } @@ -64,7 +64,7 @@ const CreateReview: FC = ({ refetch, id }) => {
- { {typeof window !== 'undefined' && ( (() => { - const currentUrl = window.location.href - const profileLink = isLogin ? `${CONSOLE_URL}/dashboard` : `${LOGIN_URL}?redirect=${encodeURIComponent(currentUrl)}` + // const currentUrl = window.location.href + const profileLink = isLogin ? `${CONSOLE_URL}/dashboard` : `${LOGIN_URL}` return ( { {typeof window !== 'undefined' && ( (() => { - const currentUrl = window.location.href - const profileLink = isLogin ? `${CONSOLE_URL}/dashboard` : `${LOGIN_URL}?redirect=${encodeURIComponent(currentUrl)}` + // const currentUrl = window.location.href + const profileLink = isLogin ? `${CONSOLE_URL}/dashboard` : `${LOGIN_URL}` return ( { if (!isLogin) return (
- +