File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
14
14
} from '@blueprintjs/core'
15
15
import { Popover2 } from '@blueprintjs/popover2'
16
16
17
- import { useAtom , useSetAtom } from 'jotai'
17
+ import { useAtom } from 'jotai'
18
18
import { ComponentType , FC , useState } from 'react'
19
19
20
20
import { LoginPanel } from 'components/account/LoginPanel'
@@ -30,7 +30,7 @@ import { EditDialog } from './account/EditDialog'
30
30
import { RegisterPanel } from './account/RegisterPanel'
31
31
32
32
const AccountMenu : FC = ( ) => {
33
- const setAuthState = useSetAtom ( authAtom )
33
+ const [ authState , setAuthState ] = useAtom ( authAtom )
34
34
const [ logoutDialogOpen , setLogoutDialogOpen ] = useState ( false )
35
35
const [ editDialogOpen , setEditDialogOpen ] = useState ( false )
36
36
@@ -64,6 +64,14 @@ const AccountMenu: FC = () => {
64
64
/>
65
65
66
66
< Menu >
67
+ { ! authState . activated && (
68
+ < MenuItem
69
+ disabled
70
+ icon = "warning-sign"
71
+ text = "账号未激活,请在退出登录后,以重置密码的方式激活"
72
+ />
73
+ ) }
74
+
67
75
< MenuItem
68
76
shouldDismissPopover = { false }
69
77
icon = "edit"
You can’t perform that action at this time.
0 commit comments