Skip to content

Commit 4d4ab4f

Browse files
committed
chore: ProfileHeader added
1 parent b9408eb commit 4d4ab4f

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Box, Text } from '@baca/design-system'
2+
import { useTranslation } from '@baca/hooks'
3+
4+
export const ProfileHeader = () => {
5+
const { t } = useTranslation()
6+
return (
7+
<Box>
8+
<Text.LgBold color="text.primary">{t('profile_screen.profile')}</Text.LgBold>
9+
<Text.MdRegular color="text.secondary">
10+
{t('profile_screen.update_your_details')}
11+
</Text.MdRegular>
12+
</Box>
13+
)
14+
}

src/screens/ProfileScreen.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useAuthControllerDelete } from '@baca/api/query/auth/auth'
22
import { ControlledField } from '@baca/components'
3+
import { ProfileHeader } from '@baca/components/screens/profile/ProfileHeader'
34
import { isWeb } from '@baca/constants'
45
import { Button, Text, Spacer, Row, Box, useBottomSheet } from '@baca/design-system'
56
import {
@@ -76,11 +77,7 @@ export const ProfileScreen = () => {
7677

7778
return (
7879
<Box p={4}>
79-
<Text.LgBold color="text.primary">{t('profile_screen.profile')}</Text.LgBold>
80-
<Spacer y={1} />
81-
<Text.MdRegular color="text.secondary">
82-
{t('profile_screen.update_your_details')}
83-
</Text.MdRegular>
80+
<ProfileHeader />
8481
<Spacer y={4} />
8582
<Box borderColor="border.secondary" borderTopWidth={1} py={6}>
8683
<Box
@@ -132,7 +129,7 @@ export const ProfileScreen = () => {
132129
mb={isWeb ? 10 : 0}
133130
maxW={800}
134131
>
135-
<Text.SmBold flex={1}>{t('form.labels.last_name')}</Text.SmBold>
132+
<Text.SmBold flex={1}>{t('form.labels.email')}</Text.SmBold>
136133
<Box flex={isWeb ? 2 : 0}>
137134
<ControlledField.Input
138135
{...{ control, errors }}
@@ -169,7 +166,6 @@ export const ProfileScreen = () => {
169166
</Button>
170167
</Row>
171168
</Box>
172-
173169
<Box borderColor="border.secondary" borderTopWidth={1} my={4} py={6} alignItems="flex-start">
174170
<Button
175171
leftIconName="delete-bin-line"

0 commit comments

Comments
 (0)