暂存,修改navigate和添加图片
This commit is contained in:
@@ -7,6 +7,7 @@ import { useLayoutStore } from './store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useEffect } from 'react';
|
||||
import { LayoutUser } from './LayoutUser';
|
||||
import PandaPNG from '@/assets/panda.png';
|
||||
|
||||
type LayoutMainProps = {
|
||||
title?: React.ReactNode;
|
||||
@@ -52,7 +53,13 @@ export const LayoutMain = (props: LayoutMainProps) => {
|
||||
</Tooltip>
|
||||
</div>
|
||||
)}
|
||||
<div className='w-8 h-8 rounded-full bg-blue-200 avatar cursor-pointer' onClick={() => menuStore.setOpenUser(true)}></div>
|
||||
<div className='w-8 h-8 rounded-full avatar cursor-pointer' onClick={() => menuStore.setOpenUser(true)}>
|
||||
{menuStore.me?.avatar ? (
|
||||
<img className='w-8 h-8 rounded-full' src={menuStore.me?.avatar} alt='avatar' />
|
||||
) : (
|
||||
<img className='w-8 h-8 rounded-full' src={PandaPNG} alt='avatar' />
|
||||
)}
|
||||
</div>
|
||||
<div className='cursor-pointer' onClick={() => menuStore.setOpenUser(true)}>
|
||||
{menuStore.me?.username}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user