diff --git a/packages/shared/src/components/profile/ProfileButton.tsx b/packages/shared/src/components/profile/ProfileButton.tsx index f51da8086f..15292a0aec 100644 --- a/packages/shared/src/components/profile/ProfileButton.tsx +++ b/packages/shared/src/components/profile/ProfileButton.tsx @@ -3,8 +3,8 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; import dynamic from 'next/dynamic'; import { useAuthContext } from '../../contexts/AuthContext'; -import { ProfilePictureWithIndicator } from './ProfilePictureWithIndicator'; -import { ProfileImageSize } from '../ProfilePicture'; +import { ProfileImageSize, ProfilePicture } from '../ProfilePicture'; +import { useProfileCompletionIndicator } from '../../hooks/profile/useProfileCompletionIndicator'; import { CoreIcon, ReputationIcon, SettingsIcon } from '../icons'; import { Button, ButtonSize, ButtonVariant } from '../buttons/Button'; import { IconSize } from '../Icon'; @@ -37,6 +37,7 @@ export default function ProfileButton({ }: ProfileButtonProps): ReactElement { const { isOpen, onUpdate, wrapHandler } = useInteractivePopup(); const { user, isAuthReady } = useAuthContext(); + const { showIndicator } = useProfileCompletionIndicator(); const { streak, isLoading, isStreaksEnabled } = useReadingStreak(); const hasCoresAccess = useHasAccessToCores(); const [animatedCores, setAnimatedCores] = useState(null); @@ -208,77 +209,85 @@ export default function ProfileButton({ icon={} /> ) : ( -
- {isStreaksEnabled && streak && ( - - )} - {hasCoresAccess && ( - - Wallet -
- {preciseBalance} Cores - - } - > -
+
+ {isStreaksEnabled && streak && ( + + )} + {hasCoresAccess && ( + + Wallet +
+ {preciseBalance} Cores + + } > - - - -
+
+ + + +
+ + )} + + +
+ {showIndicator && ( +
)} - - -
)} {isOpen && onUpdate(false)} />} diff --git a/packages/shared/src/components/streak/ReadingStreakButton.tsx b/packages/shared/src/components/streak/ReadingStreakButton.tsx index 30dfe8976b..dda43c5790 100644 --- a/packages/shared/src/components/streak/ReadingStreakButton.tsx +++ b/packages/shared/src/components/streak/ReadingStreakButton.tsx @@ -122,18 +122,30 @@ export function ReadingStreakButton({ type="button" iconPosition={iconPosition} icon={ - - - {!isTimezoneOk && ( - - )} - + compact ? ( +
+ + + + {!isTimezoneOk && ( + + )} +
+ ) : ( + + + {!isTimezoneOk && ( + + )} + + ) } variant={ compact || isLaptop || isMobile