1- import React from 'react' ;
1+ import React , { useState } from 'react' ;
22import { VBox , HBox } from "@/ui/shared-components/LayoutBoxes" ;
33import { Typography } from "@mui/material" ;
44import useTranslation from "@/ui/language/useTranslation" ;
55import theme from "@/theme" ;
66import RegularButton from '@/ui/shared-components/buttons/RegularButton' ;
77import useUserProfileData from "../hooks/useUserProfileData" ;
8+ import featureFlags from '@/featureFlags' ;
89
910
1011const ProfileDataList = ( ) => {
12+ const [ open , setOpen ] = useState ( null ) ;
1113 const { t } = useTranslation ( ) ;
1214 const userProfileData = useUserProfileData ( ) ;
1315
@@ -28,14 +30,42 @@ const ProfileDataList = () => {
2830 } }
2931 justifyContent = { 'center' }
3032 >
31- < Typography variant = 'body2' >
32- { label }
33- </ Typography >
34- < Typography variant = 'h2' sx = { {
35- fontWeight : '500' , wordWrap : "break-word" ,
33+ < HBox sx = { {
34+ justifyContent : 'space-between' ,
35+ alignItems : 'flex-end' ,
36+ flexWrap : 'wrap'
3637 } } >
37- { value }
38- </ Typography >
38+ < VBox >
39+ < Typography variant = 'body2' >
40+ { label }
41+ </ Typography >
42+ < Typography variant = 'h2' sx = { {
43+ fontWeight : '500' , wordWrap : "break-word" ,
44+ } } >
45+ { value }
46+ </ Typography >
47+ </ VBox >
48+ < VBox >
49+ {
50+ featureFlags . profileUpdates && (
51+ < RegularButton
52+ onClick = { ( ) => setOpen ( open === index ? null : index ) }
53+ variant = { 'transparentPink' }
54+ text = { 'update' }
55+ size = { 'xsmall' }
56+ />
57+ )
58+ }
59+
60+ </ VBox >
61+ </ HBox >
62+ {
63+ featureFlags . profileUpdates && open === index && (
64+ < Typography variant = 'body2' sx = { { marginTop : 2 } } >
65+ { t ( 'app.profile.updateInfoHint' ) }
66+ </ Typography >
67+ )
68+ }
3969 </ VBox >
4070 ) ) }
4171 </ VBox > ) : (
0 commit comments