From 067af56189b56e20cc99b36277fa925de531149a Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Tue, 6 Jan 2026 12:45:04 +0330 Subject: [PATCH] redirect --- src/app/dmag/components/CreateReview.tsx | 4 ++-- src/shared/Header.tsx | 8 ++++---- src/shared/SideBar.tsx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) 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 (
- +