Avoid showing a loader on profile and user chip on subsequent loads (#6296)

This commit is contained in:
Clément Pasteau
2024-01-30 09:23:09 +01:00
committed by GitHub
parent 8f155e4322
commit dba65822dd
2 changed files with 2 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ const ProfileDialog = ({ open, onClose }: Props) => {
maxWidth={isConnected ? 'md' : 'sm'} maxWidth={isConnected ? 'md' : 'sm'}
flexColumnBody flexColumnBody
> >
{authenticatedUser.loginState === 'loggingIn' ? ( {!isConnected && authenticatedUser.loginState === 'loggingIn' ? (
<PlaceholderLoader /> <PlaceholderLoader />
) : authenticatedUser.authenticated && authenticatedUser.profile ? ( ) : authenticatedUser.authenticated && authenticatedUser.profile ? (
<Line> <Line>

View File

@@ -35,7 +35,7 @@ const UserChip = ({ onOpenProfile }: Props) => {
loginState, loginState,
} = authenticatedUser; } = authenticatedUser;
const displayNotificationBadge = hasPendingNotifications(authenticatedUser); const displayNotificationBadge = hasPendingNotifications(authenticatedUser);
return loginState === 'loggingIn' ? ( return !profile && loginState === 'loggingIn' ? (
<CircularProgress size={25} /> <CircularProgress size={25} />
) : profile ? ( ) : profile ? (
<DotBadge overlap="circle" invisible={!displayNotificationBadge}> <DotBadge overlap="circle" invisible={!displayNotificationBadge}>