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'}
flexColumnBody
>
{authenticatedUser.loginState === 'loggingIn' ? (
{!isConnected && authenticatedUser.loginState === 'loggingIn' ? (
<PlaceholderLoader />
) : authenticatedUser.authenticated && authenticatedUser.profile ? (
<Line>

View File

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