Fix can not autoload in production mode bug

This commit is contained in:
2024-01-15 15:57:48 +08:00
parent bcf29f74ef
commit 6d08e1a8e8
24 changed files with 36 additions and 57 deletions

View File

@@ -1,7 +1,6 @@
import Icon from '@ant-design/icons'
import { COLOR_ERROR } from '@/constants/common.constants'
import { getRedirectUrl } from '@/util/route'
import { useUpdatedEffect } from '@/util/hooks'
import { getAvatar, getLoginStatus, getNickname, removeToken } from '@/util/auth'
import { r_auth_logout } from '@/services/auth'
@@ -42,7 +41,7 @@ const Footer = () => {
const loginStatus = getLoginStatus()
useUpdatedEffect(() => {
useEffect(() => {
if (getLoginStatus()) {
void getNickname().then((nickname) => {
setNickname(nickname)