Skip to content

Commit c5a75ad

Browse files
chore: revert changes in home screen
1 parent c754d75 commit c5a75ad

1 file changed

Lines changed: 28 additions & 23 deletions

File tree

src/screens/HomeScreen.tsx

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
1-
import { BACA_APP_URL, BACA_DOCS_URL } from '@baca/constants'
2-
import { Box, Button, Center, Text } from '@baca/design-system'
1+
import { CompanyLogo } from '@baca/components'
2+
import { Button, Center, Text } from '@baca/design-system'
33
import { useCallback, useScreenOptions, useTranslation } from '@baca/hooks'
4-
import { Linking } from 'react-native'
4+
import { router } from 'expo-router'
55

66
export const HomeScreen = () => {
77
const { t } = useTranslation()
8-
98
useScreenOptions({
109
title: t('navigation.screen_titles.home'),
1110
})
1211

13-
const openLink = useCallback((url: string) => {
14-
Linking.openURL(url)
12+
const navigateToDetails = useCallback(() => {
13+
router.navigate({
14+
pathname: 'home/details',
15+
params: { user: 'example@example.com' },
16+
})
17+
}, [])
18+
const navigateToBlog = useCallback(() => {
19+
router.navigate('/blog')
20+
}, [])
21+
22+
const navigateToBigForm = useCallback(() => {
23+
router.navigate('/big-form')
1524
}, [])
1625

1726
return (
1827
<Center flex={1} px={4}>
19-
<Text.XxlBold textAlign="center">{t('home_screen.header_title')}</Text.XxlBold>
20-
<Text.LgRegular textAlign="center">{t('home_screen.header_subtitle')}</Text.LgRegular>
21-
22-
<Box alignItems="center" flexDirection="row" flexWrap="wrap" justifyContent="center" mt={4}>
23-
<Button h={12} m={3} maxWidth={160} minWidth={160} onPress={() => openLink(BACA_DOCS_URL)}>
24-
{t('home_screen.read_docs')}
25-
</Button>
26-
<Button.SecondaryColor
27-
h={12}
28-
m={3}
29-
maxWidth={160}
30-
minWidth={160}
31-
onPress={() => openLink(BACA_APP_URL)}
32-
>
33-
{t('home_screen.try_it')}
34-
</Button.SecondaryColor>
35-
</Box>
28+
<CompanyLogo />
29+
<Text.MdBold textAlign="center">{t('hello')}</Text.MdBold>
30+
<Text.MdRegular textAlign="center">{t('thanks')}</Text.MdRegular>
31+
<Text.MdRegular textAlign="center">{t('app_information')}</Text.MdRegular>
32+
<Button mt={4} onPress={navigateToDetails}>
33+
{t('home_screen.details')}
34+
</Button>
35+
<Button mt={4} onPress={navigateToBigForm}>
36+
{t('landing_screen.go_to_form')}
37+
</Button>
38+
<Button mt={4} onPress={navigateToBlog}>
39+
{t('landing_screen.go_to_blog')}
40+
</Button>
3641
</Center>
3742
)
3843
}

0 commit comments

Comments
 (0)