Skip to content

Commit fcefe6a

Browse files
committed
prep profile updates
1 parent 3323a3d commit fcefe6a

2 files changed

Lines changed: 42 additions & 10 deletions

File tree

src/featureFlags.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const defaultFlags = {
22
subindividuals: false,
3-
matchingEnginePerformanceLogging: false
3+
matchingEnginePerformanceLogging: false,
4+
profileUpdates: false
45
};
56

67
const getFeatureFlag = (flag) => {
@@ -10,7 +11,8 @@ const getFeatureFlag = (flag) => {
1011

1112
const featureFlags = {
1213
subindividuals: getFeatureFlag('subindividuals'),
13-
matchingEnginePerformanceLogging: getFeatureFlag('matchingEnginePerformanceLogging')
14+
matchingEnginePerformanceLogging: getFeatureFlag('matchingEnginePerformanceLogging'),
15+
profileUpdates: getFeatureFlag('profileUpdates')
1416
};
1517

1618
export const setFeatureFlag = (flag, value) => {

src/ui/screens/profile-screen/components/ProfileDataList.js

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import React from 'react';
1+
import React, { useState } from 'react';
22
import { VBox, HBox } from "@/ui/shared-components/LayoutBoxes";
33
import { Typography } from "@mui/material";
44
import useTranslation from "@/ui/language/useTranslation";
55
import theme from "@/theme";
66
import RegularButton from '@/ui/shared-components/buttons/RegularButton';
77
import useUserProfileData from "../hooks/useUserProfileData";
8+
import featureFlags from '@/featureFlags';
89

910

1011
const 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

Comments
 (0)