11import { Button , Center , Text } from '@baca/design-system'
22import { useCallback , useScreenOptions , useTranslation } from '@baca/hooks'
3- import React from 'react'
4- import { View , Linking , StyleSheet , ScrollView , Image , Dimensions } from 'react-native'
3+ import { View , Linking , StyleSheet } from 'react-native'
54
6- import iphoneSettingsDraftDark from './iphone_settings_draft_dark.png'
7- import iphoneSettingsDraftLight from './iphone_settings_draft_light.png'
8- import iphoneSignupDraftDark from './iphone_signup_draft_dark.png'
9- import iphoneSignupDraftLight from './iphone_signup_draft_light.png'
10-
11- const imageSources = [
12- iphoneSettingsDraftDark ,
13- iphoneSettingsDraftLight ,
14- iphoneSignupDraftDark ,
15- iphoneSignupDraftLight ,
16- ]
5+ //TODO: Delete JSON we're not using
6+ //TODO: Add t internationalization for buttons
177
188export const HomeScreen = ( ) => {
199 const { t } = useTranslation ( )
@@ -37,7 +27,7 @@ export const HomeScreen = () => {
3727 h = { 12 }
3828 minWidth = { 160 }
3929 maxWidth = { 160 }
40- onPress = { ( ) => openLink ( '/docs/overview' ) }
30+ onPress = { ( ) => openLink ( 'https://baca-docs.vercel.app /docs/overview' ) }
4131 >
4232 < Text . MdBold > Read docs</ Text . MdBold >
4333 </ Button >
@@ -51,24 +41,10 @@ export const HomeScreen = () => {
5141 < Text . MdBold > Try it</ Text . MdBold >
5242 </ Button . SecondaryColor >
5343 </ View >
54- < ScrollView
55- horizontal
56- pagingEnabled
57- showsHorizontalScrollIndicator = { false }
58- style = { styles . sliderContainer }
59- centerContent
60- decelerationRate = { 0.99 }
61- >
62- { imageSources . map ( ( source , index ) => (
63- < Image key = { index } source = { source } style = { styles . sliderImage } />
64- ) ) }
65- </ ScrollView >
6644 </ Center >
6745 )
6846}
6947
70- const { width } = Dimensions . get ( 'window' )
71-
7248const styles = StyleSheet . create ( {
7349 buttonsContainer : {
7450 alignItems : 'center' ,
@@ -77,70 +53,4 @@ const styles = StyleSheet.create({
7753 justifyContent : 'center' ,
7854 marginTop : 16 ,
7955 } ,
80- sliderContainer : {
81- gap : 16 ,
82- marginTop : 16 ,
83- width : '100%' ,
84- } ,
85- sliderImage : {
86- height : '100%' ,
87- resizeMode : 'contain' ,
88- width,
89- } ,
9056} )
91-
92- export default HomeScreen
93-
94- // import { Button, Center, Text } from '@baca/design-system'
95- // import { useCallback, useScreenOptions, useTranslation } from '@baca/hooks'
96- // import { View, Linking, StyleSheet } from 'react-native'
97-
98- // export const HomeScreen = () => {
99- // const { t } = useTranslation()
100-
101- // useScreenOptions({
102- // title: t('navigation.screen_titles.home'),
103- // })
104-
105- // const openLink = useCallback((url: string) => {
106- // Linking.openURL(url)
107- // }, [])
108-
109- // return (
110- // <Center flex={1} px={4}>
111- // <Text.XxlBold textAlign="center">{t('home_header_title')}</Text.XxlBold>
112- // <Text.LgRegular textAlign="center">{t('home_header_subtitle')}</Text.LgRegular>
113-
114- // <View style={styles.buttonsContainer}>
115- // <Button
116- // m={3}
117- // h={12}
118- // minWidth={160}
119- // maxWidth={160}
120- // onPress={() => openLink('/docs/overview')}
121- // >
122- // <Text.MdBold>Read docs</Text.MdBold>
123- // </Button>
124- // <Button.SecondaryColor
125- // m={3}
126- // h={12}
127- // minWidth={160}
128- // maxWidth={160}
129- // onPress={() => openLink('https://binarapps.online/sign-in')}
130- // >
131- // <Text.MdBold>Try it</Text.MdBold>
132- // </Button.SecondaryColor>
133- // </View>
134- // </Center>
135- // )
136- // }
137-
138- // const styles = StyleSheet.create({
139- // buttonsContainer: {
140- // alignItems: 'center',
141- // flexDirection: 'row',
142- // flexWrap: 'wrap',
143- // justifyContent: 'center',
144- // marginTop: 16,
145- // },
146- // })
0 commit comments