heck windo
This commit is contained in:
@@ -77,7 +77,12 @@ const Header: FC = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href={isLogin ? CONSOLE_URL + '/profile' : `${LOGIN_URL}?redirect=${typeof window !== 'undefined' ? window.location.href : ''}`} target='_blank' className='border-l-2 whitespace-nowrap border-[#D8DCE4] pl-4 flex gap-2'>
|
{typeof window !== 'undefined' && (
|
||||||
|
(() => {
|
||||||
|
const currentUrl = window.location.href
|
||||||
|
const profileLink = isLogin ? `${CONSOLE_URL}/profile` : `${LOGIN_URL}?redirect=${encodeURIComponent(currentUrl)}`
|
||||||
|
return (
|
||||||
|
<a href={profileLink} target='_blank' className='border-l-2 whitespace-nowrap border-[#D8DCE4] pl-4 flex gap-2'>
|
||||||
<Profile
|
<Profile
|
||||||
size={20}
|
size={20}
|
||||||
color='black'
|
color='black'
|
||||||
@@ -88,6 +93,9 @@ const Header: FC = () => {
|
|||||||
<div>ورود | ثبت نام</div>
|
<div>ورود | ثبت نام</div>
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
|
)
|
||||||
|
})()
|
||||||
|
)}
|
||||||
|
|
||||||
<Link href='/contact'>
|
<Link href='/contact'>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user