11import React from 'react'
2- import { StyleSheet , Text , View } from 'react-native'
32import { useRouteParams } from '@app/core/navigation/useRouteParams'
4- import { Link } from '../navigation/Link '
3+ import { View , Text , H3 , TextLink } from '../components/styled '
54import { useRouter } from '../navigation/useRouter'
65
76/* --- <SlugScreen/> --------------------------------------------------------------------------- */
@@ -17,71 +16,45 @@ const SlugScreen = (props) => {
1716 // -- Render --
1817
1918 return (
20- < View style = { styles . container } >
19+ < View className = "flex flex-1 justify-center items-center" >
2120 { showBackButton && (
2221 < Text
23- style = { { ... styles . backButton , ... styles . link , textDecorationLine : 'none' } }
22+ className = "text-blue-500 absolute top-8 web:top-0 left-0 p-4"
2423 onPress = { back }
2524 >
2625 { `< Back` }
2726 </ Text >
2827 ) }
29- < Text style = { styles . title } >
28+ < H3 >
3029 Page slug: { slug }
3130 { ! ! count && ` | count: ${ count } ` }
31+ </ H3 >
32+ < Text className = "mt-2 text-base text-center" >
33+ Need a more robust, Fully-Stacked, Full-Product, Universal App Setup?
3234 </ Text >
33- < Text style = { styles . subtitle } > Need a more robust, Fully-Stacked, Full-Product, Universal App Setup?</ Text >
34- < Link href = "https://github.com/Aetherspace/green-stack-starter-demo#readme" target = "_blank" style = { styles . link } >
35+ < TextLink
36+ href = "https://github.com/Aetherspace/green-stack-starter-demo#readme"
37+ className = "mt-4 text-center"
38+ target = "_blank"
39+ >
3540 Check out the GREEN Stack Starter
36- </ Link >
37- < Text style = { styles . link } onPress = { ( ) => push ( '/subpages/push' ) } >
41+ </ TextLink >
42+ < Text className = "mt-4 text-center text-blue-500 underline" onPress = { ( ) => push ( '/subpages/push' ) } >
3843 { `router.push()` }
3944 </ Text >
40- < Text style = { styles . link } onPress = { ( ) => navigate ( '/subpages/navigate' ) } >
45+ < Text className = "mt-4 text-center text-blue-500 underline" onPress = { ( ) => navigate ( '/subpages/navigate' ) } >
4146 { `router.navigate()` }
4247 </ Text >
43- < Text style = { styles . link } onPress = { ( ) => replace ( '/subpages/replace' ) } >
48+ < Text className = "mt-4 text-center text-blue-500 underline" onPress = { ( ) => replace ( '/subpages/replace' ) } >
4449 { `router.replace()` }
4550 </ Text >
46- < Text style = { styles . link } onPress = { ( ) => setParams ( { count : `${ + count + 1 } ` } ) } >
51+ < Text className = "mt-4 text-center text-blue-500 underline" onPress = { ( ) => setParams ( { count : `${ + count + 1 } ` } ) } >
4752 { `router.setParams()` }
4853 </ Text >
4954 </ View >
5055 )
5156}
5257
53- /* --- Styles ---------------------------------------------------------------------------------- */
54-
55- const styles = StyleSheet . create ( {
56- container : {
57- flex : 1 ,
58- justifyContent : 'center' ,
59- alignItems : 'center' ,
60- } ,
61- backButton : {
62- position : 'absolute' ,
63- top : 16 ,
64- left : 16 ,
65- } ,
66- title : {
67- fontWeight : 'bold' ,
68- fontSize : 16 ,
69- textAlign : 'center' ,
70- } ,
71- subtitle : {
72- marginTop : 8 ,
73- fontSize : 16 ,
74- textAlign : 'center' ,
75- } ,
76- link : {
77- marginTop : 16 ,
78- fontSize : 16 ,
79- color : 'blue' ,
80- textAlign : 'center' ,
81- textDecorationLine : 'underline' ,
82- } ,
83- } )
84-
8558/* --- Exports --------------------------------------------------------------------------------- */
8659
8760export default SlugScreen
0 commit comments