This commit is contained in:
hamid zarghami
2026-01-06 12:45:04 +03:30
parent 1609f2be60
commit 067af56189
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ const CreateReview: FC<Props> = ({ 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<Props> = ({ refetch, id }) => {
</div>
<div className='mt-6 flex justify-center'>
<Link href={LOGIN_URL + '?redirect=' + window.location.href}>
<Link href={LOGIN_URL}>
<Button
label={'ورود | ثبت نام'}
className='w-fit px-7'
+4 -4
View File
@@ -79,8 +79,8 @@ const Header: FC = () => {
{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 (
<a href={profileLink} target='_blank' className='border-l-2 whitespace-nowrap border-[#D8DCE4] pl-4 flex gap-2'>
<Profile
@@ -129,8 +129,8 @@ const Header: FC = () => {
{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 (
<a href={profileLink} target='_blank'>
<Profile
+1 -1
View File
@@ -107,7 +107,7 @@ const SideBar: FC = () => {
if (!isLogin)
return (
<div className='flex-1 flex items-end justify-center px-12'>
<Link className='w-full' href={`${LOGIN_URL}?redirect=${encodeURIComponent(window.location.href)}`}>
<Link className='w-full' href={`${LOGIN_URL}`}>
<Button
label='ورود | ثبت نام'
/>