fix(Header): Handling redirects when clicking on the `login` menu

This commit is contained in:
haitaoo 2023-05-24 17:46:25 +08:00
parent 6eed25f48c
commit 3e1e411dd0
2 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,7 @@ import {
import classnames from 'classnames';
import { userCenter } from '@/utils';
import { userCenter, floppyNavigation } from '@/utils';
import {
loggedUserInfoStore,
siteInfoStore,
@ -152,6 +152,7 @@ const Header: FC = () => {
'link-light': navbarStyle === 'theme-colored',
'link-primary': navbarStyle !== 'theme-colored',
})}
onClick={() => floppyNavigation.storageLoginRedirect()}
href={userCenter.getLoginUrl()}>
{t('btns.login')}
</Button>
@ -224,6 +225,7 @@ const Header: FC = () => {
'link-light': navbarStyle === 'theme-colored',
'link-primary': navbarStyle !== 'theme-colored',
})}
onClick={() => floppyNavigation.storageLoginRedirect()}
href={userCenter.getLoginUrl()}>
{t('btns.login')}
</Button>

View File

@ -136,4 +136,5 @@ export const floppyNavigation = {
isRoutableLink,
handleRouteLinkClick,
equalToCurrentHref,
storageLoginRedirect,
};