perf: image and auth

This commit is contained in:
archer
2023-04-28 14:01:27 +08:00
parent 75073a64fb
commit ca8e940c9b
8 changed files with 24 additions and 22 deletions

View File

@@ -78,14 +78,14 @@ const ModelEditForm = ({
:
</Box>
<Image
src={getValues('avatar')}
src={getValues('avatar') || '/icon/logo.png'}
alt={'avatar'}
w={['28px', '36px']}
h={['28px', '36px']}
objectFit={'cover'}
cursor={'pointer'}
cursor={isOwner ? 'pointer' : 'default'}
title={'点击切换头像'}
onClick={onOpenSelectFile}
onClick={() => isOwner && onOpenSelectFile()}
/>
</Flex>
<FormControl mt={4}>