File tree 2 files changed +31
-6
lines changed
2 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default function Account({ session }: { session: Session }) {
24
24
25
25
const { data, error, status } = await supabase
26
26
. from ( 'profiles' )
27
- . select ( `username, phone,email` )
27
+ . select ( `username, phone, email` )
28
28
. eq ( 'id' , session ?. user . id )
29
29
. single ( ) ;
30
30
if ( error && status !== 406 ) {
@@ -85,8 +85,25 @@ export default function Account({ session }: { session: Session }) {
85
85
< LinearGradient
86
86
colors = { [ '#833ab4' , '#fd1d1d' , '#fcb045' ] }
87
87
style = { { height : Dimensions . get ( 'window' ) . height , flex : 1 } } >
88
- < View className = "flex-1" >
89
- < FormInput title = "Email" input = { email } onInputChange = { ( ) => setEmail } />
88
+ < View className = "flex-1 pt-10" >
89
+ < FormInput
90
+ placeholder = "Email"
91
+ title = "Email"
92
+ input = { email }
93
+ onInputChange = { ( ) => setEmail }
94
+ />
95
+ < FormInput
96
+ placeholder = "Username"
97
+ title = "Username"
98
+ input = { username }
99
+ onInputChange = { ( ) => setUsername }
100
+ />
101
+ < FormInput
102
+ placeholder = "Phone"
103
+ title = "Phone"
104
+ input = { phone }
105
+ onInputChange = { ( ) => setPhone }
106
+ />
90
107
< Button
91
108
title = "Update Profile"
92
109
onPress = { ( ) => updateProfile ( { username, phone, email } ) }
Original file line number Diff line number Diff line change @@ -4,15 +4,23 @@ export default function FormInput({
4
4
title,
5
5
input,
6
6
onInputChange,
7
+ placeholder,
7
8
} : {
8
9
title : string ;
9
10
input : string ;
10
11
onInputChange : ( ) => void ;
12
+ placeholder : string ;
11
13
} ) {
12
14
return (
13
- < View className = "gap-2 p-2" >
14
- < Text className = "text-lg font-semibold text-white" > { title } </ Text >
15
- < TextInput className = "border-b border-gray-300" value = { input } onChangeText = { onInputChange } />
15
+ < View className = "flex-row gap-2 border-b border-gray-300 p-2" >
16
+ < Text className = "pl-2 text-lg font-semibold text-white" > { title } :</ Text >
17
+ < TextInput
18
+ className = "pl-2"
19
+ value = { input }
20
+ onChangeText = { onInputChange }
21
+ placeholder = { placeholder }
22
+ placeholderTextColor = "gainsboro"
23
+ />
16
24
</ View >
17
25
) ;
18
26
}
You can’t perform that action at this time.
0 commit comments