Skip to content

Commit 6b8a5d8

Browse files
authored
fix: hide profile completion widget on mobile if dismissed (#5390)
1 parent c89defc commit 6b8a5d8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/webapp/pages/[userId]/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import classNames from 'classnames';
2828
import { ProfileCompletion } from '@dailydotdev/shared/src/features/profile/components/ProfileWidgets/ProfileCompletion';
2929
import { Share } from '@dailydotdev/shared/src/features/profile/components/ProfileWidgets/Share';
3030
import { useRouter } from 'next/router';
31+
import { useProfileCompletionIndicator } from '@dailydotdev/shared/src/hooks/profile/useProfileCompletionIndicator';
3132
import {
3233
getLayout as getProfileLayout,
3334
getProfileSeoDefaults,
@@ -51,6 +52,8 @@ const ProfilePage = ({
5152
() => checkHasCompleted(ActionType.ClosedProfileBanner),
5253
[checkHasCompleted],
5354
);
55+
const { showIndicator: showProfileCompletion } =
56+
useProfileCompletionIndicator();
5457

5558
const { user, isUserSame: isUserSameBase } = useProfile(initialUser);
5659

@@ -85,7 +88,9 @@ const ProfilePage = ({
8588
!hideSticky ? 'fixed tablet:pl-20' : 'relative',
8689
)}
8790
/>
88-
{isSameUser && <ProfileCompletion className="laptop:hidden" />}
91+
{isSameUser && showProfileCompletion && (
92+
<ProfileCompletion className="laptop:hidden" />
93+
)}
8994
<div ref={stickyRef} />
9095
<ProfileHeader
9196
user={user}

0 commit comments

Comments
 (0)