chore: update store selector

This commit is contained in:
boojack
2022-05-22 12:41:15 +08:00
parent 948b53393a
commit 2e5b120986
15 changed files with 79 additions and 75 deletions

View File

@ -17,8 +17,7 @@ const validateConfig: ValidatorConfig = {
interface Props {}
const MyAccountSection: React.FC<Props> = () => {
const { user: userState } = useAppSelector((state) => state);
const user = userState.user as User;
const user = useAppSelector((state) => state.user.user as User);
const [username, setUsername] = useState<string>(user.name);
const openAPIRoute = `${window.location.origin}/h/${user.openId}/memo`;