Skip to content

Commit

Permalink
perf: improve avatar display timing for non-avatar user
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Oct 1, 2024
1 parent b778f8c commit 04dc1e9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/components/layout/UserConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const UserConfig: React.FC<UserConfigProps> = React.memo((props) => {
<Avatar size={props.isCollapsed ? 'sm' : 'default'}>
{userInfo?.avatar && <AvatarImage src={userInfo.avatar} />}

<AvatarFallback>
<AvatarFallback delayMs={userInfo?.avatar ? undefined : 0}>
{nickname.substring(0, 2).toUpperCase()}
</AvatarFallback>
</Avatar>
Expand Down
1 change: 0 additions & 1 deletion src/client/routes/website/$websiteId/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Loading } from '@/components/Loading';
import { NotFoundTip } from '@/components/NotFoundTip';
import { Button } from '@/components/ui/button';
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';
import { Separator } from '@/components/ui/separator';
import { WebsiteCodeBtn } from '@/components/website/WebsiteCodeBtn';
import { WebsiteLighthouseBtn } from '@/components/website/WebsiteLighthouseBtn';
import { WebsiteMetricsTable } from '@/components/website/WebsiteMetricsTable';
Expand Down

0 comments on commit 04dc1e9

Please sign in to comment.