@@ -4,7 +4,7 @@ import Line, {
44} from '@xmartlabs/react-native-line'
55import { useRouter } from 'expo-router'
66import { Fragment , useEffect , useState } from 'react'
7- import { Alert , Dimensions , Image , StyleSheet } from 'react-native'
7+ import { Alert , Dimensions , Image , StyleSheet , View } from 'react-native'
88
99import { LineError } from '@/common/errors'
1010import {
@@ -15,6 +15,7 @@ import { ActivityBanner } from '@/components/ActivityBanner'
1515import { Bullet } from '@/components/Bullet'
1616import { Button } from '@/components/Button'
1717import { ThemedView } from '@/components/ThemedView'
18+ import { Color } from '@/constants/color'
1819
1920function handleError ( error : LineError ) {
2021 const userInfo = JSON . parse ( error . userInfo ?. message ?? '' )
@@ -80,17 +81,15 @@ export default function HomeScreen() {
8081 return (
8182 < Fragment >
8283 < ThemedView style = { styles . container } >
83- < ThemedView style = { styles . contentContainer } >
84+ < View style = { styles . contentContainer } >
8485 < Image source = { { uri : user ?. pictureUrl } } style = { styles . image } />
85- < Bullet header = { strings . name } text = { user ?. displayName } />
86- < Bullet header = { strings . userId } text = { user ?. userId } />
87- < Bullet header = { strings . accessToken } text = { token ?. accessToken } />
88- </ ThemedView >
86+ < Bullet body = { user ?. displayName } header = { strings . name } />
87+ < Bullet body = { user ?. userId } header = { strings . userId } />
88+ < Bullet body = { token ?. accessToken } header = { strings . accessToken } />
89+ </ View >
90+ < Button onPress = { verifyAccessToken } text = { strings . verifyToken } />
91+ < Button onPress = { refreshAccessToken } text = { strings . refreshToken } />
8992 < Button onPress = { getFriendshipStatus } text = { strings . isFriend } />
90- < ThemedView style = { styles . row } >
91- < Button onPress = { verifyAccessToken } text = { strings . verifyToken } />
92- < Button onPress = { refreshAccessToken } text = { strings . refreshToken } />
93- </ ThemedView >
9493 < Button onPress = { logOut } text = { strings . logOut } />
9594 </ ThemedView >
9695 { loading && < ActivityBanner /> }
@@ -112,7 +111,6 @@ const strings = {
112111
113112const styles = StyleSheet . create ( {
114113 container : {
115- alignItems : 'center' ,
116114 flex : 1 ,
117115 gap : 16 ,
118116 justifyContent : 'center' ,
@@ -126,16 +124,12 @@ const styles = StyleSheet.create({
126124 } ,
127125 image : {
128126 alignSelf : 'center' ,
129- backgroundColor : 'black' ,
130- borderColor : 'gray' ,
127+ backgroundColor : Color . Gray ,
128+ borderColor : Color . LightGray ,
131129 borderRadius : Dimensions . get ( 'window' ) . width / 1.5 ,
132130 borderWidth : 0.5 ,
133131 height : Dimensions . get ( 'window' ) . width / 3 ,
134132 resizeMode : 'cover' ,
135133 width : Dimensions . get ( 'window' ) . width / 3 ,
136134 } ,
137- row : {
138- flexDirection : 'row' ,
139- gap : 16 ,
140- } ,
141135} )
0 commit comments