@@ -14,6 +14,9 @@ import Link from '../../../../components/utilities/Link';
1414import { anchorDefaultRel } from '../../../../lib/strings' ;
1515import { webappUrl } from '../../../../lib/constants' ;
1616import { useAuthContext } from '../../../../contexts/AuthContext' ;
17+ import CloseButton from '../../../../components/CloseButton' ;
18+ import { ButtonSize } from '../../../../components/buttons/Button' ;
19+ import { useProfileCompletionIndicator } from '../../../../hooks/profile/useProfileCompletionIndicator' ;
1720
1821type CompletionItem = {
1922 label : string ;
@@ -75,6 +78,7 @@ export const ProfileCompletion = ({
7578 className,
7679} : ProfileCompletionProps ) : ReactElement | null => {
7780 const { user } = useAuthContext ( ) ;
81+ const { dismissIndicator } = useProfileCompletionIndicator ( ) ;
7882 const profileCompletion = user ?. profileCompletion ;
7983
8084 const items = useMemo (
@@ -103,16 +107,21 @@ export const ProfileCompletion = ({
103107 }
104108
105109 return (
106- < Link href = { redirectPath } >
107- < a
108- href = { redirectPath }
109- rel = { anchorDefaultRel }
110- className = { classNames (
111- 'flex cursor-pointer flex-col gap-6 border border-action-help-active bg-action-help-float p-4 hover:bg-action-help-hover laptop:rounded-16' ,
112- className ,
113- ) }
114- >
115- < div className = "flex w-full items-center gap-6" >
110+ < div
111+ className = { classNames (
112+ 'flex cursor-pointer flex-col border border-action-help-active bg-action-help-float hover:bg-action-help-hover laptop:rounded-16' ,
113+ className ,
114+ ) }
115+ >
116+ < div className = "flex justify-end px-2 pt-2" >
117+ < CloseButton size = { ButtonSize . XSmall } onClick = { dismissIndicator } />
118+ </ div >
119+ < Link href = { redirectPath } >
120+ < a
121+ href = { redirectPath }
122+ rel = { anchorDefaultRel }
123+ className = "flex w-full items-center gap-6 p-4 pt-0"
124+ >
116125 < div className = "flex min-w-0 flex-1 flex-col gap-1" >
117126 < div className = "flex items-center gap-1" >
118127 < InfoIcon
@@ -152,8 +161,8 @@ export const ProfileCompletion = ({
152161 color = "help"
153162 />
154163 </ div >
155- </ div >
156- </ a >
157- </ Link >
164+ </ a >
165+ </ Link >
166+ </ div >
158167 ) ;
159168} ;
0 commit comments