|
|
@ -10,15 +10,11 @@ import { LoginModal } from '@/components';
|
|
|
|
import { useUserStore } from '@/store';
|
|
|
|
import { useUserStore } from '@/store';
|
|
|
|
|
|
|
|
|
|
|
|
export default function Auth() {
|
|
|
|
export default function Auth() {
|
|
|
|
const { userInfo } = useUserStore(
|
|
|
|
const userId = useUserStore(useShallow((state) => state.userInfo.id));
|
|
|
|
useShallow((state) => ({
|
|
|
|
|
|
|
|
userInfo: state.userInfo,
|
|
|
|
|
|
|
|
})),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{!!userInfo.id ? (
|
|
|
|
{!!userId ? (
|
|
|
|
<HeaderAvatar className="ml-[40px]" />
|
|
|
|
<HeaderAvatar className="ml-[40px]" />
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<LoginProvider>
|
|
|
|
<LoginProvider>
|
|
|
|