heck windo

This commit is contained in:
hamid zarghami
2025-04-21 12:30:40 +03:30
parent dbee916ad3
commit 1eb0608591
+9 -1
View File
@@ -77,7 +77,12 @@ const Header: FC = () => {
/>
</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
size={20}
color='black'
@@ -88,6 +93,9 @@ const Header: FC = () => {
<div>ورود | ثبت نام</div>
)}
</a>
)
})()
)}
<Link href='/contact'>
<Button