@@ -11,6 +11,7 @@ import {
11
11
} from "@expo/vector-icons" ;
12
12
13
13
import AlertBox from "../components/AlertBox" ;
14
+ import { useSafeAreaInsets } from "react-native-safe-area-context" ;
14
15
15
16
const db = SQLite . openDatabase ( "myDatabase.db" ) ;
16
17
@@ -26,6 +27,8 @@ export default function Home({ navigation }) {
26
27
color : null ,
27
28
} ) ;
28
29
30
+ const insets = useSafeAreaInsets ( ) ;
31
+
29
32
const handleCheckbox = ( ) => {
30
33
if ( isCheck ) {
31
34
setCheck ( false ) ;
@@ -125,48 +128,48 @@ export default function Home({ navigation }) {
125
128
126
129
return (
127
130
< View style = { styles . container } >
128
- < View style = { styles . responseContainer } >
129
- < View style = { styles . headerContainer } >
130
- < Text
131
- style = { {
132
- fontSize : 20 ,
133
- } }
134
- >
135
- History
136
- </ Text >
131
+ < View style = { [ styles . headerContainer , { paddingTop : 50 } ] } >
132
+ < Text
133
+ style = { {
134
+ fontSize : 20 ,
135
+ } }
136
+ >
137
+ History
138
+ </ Text >
137
139
138
- < View style = { { flexDirection : "row" , gap : 16 , alignItems : "center" } } >
139
- { isDelete ? (
140
- < Pressable onPress = { handleAllDelete } >
141
- < MaterialIcons name = "delete-forever" size = { 24 } color = "black" />
142
- </ Pressable >
140
+ < View style = { { flexDirection : "row" , gap : 16 , alignItems : "center" } } >
141
+ { isDelete ? (
142
+ < Pressable onPress = { handleAllDelete } >
143
+ < MaterialIcons name = "delete-forever" size = { 24 } color = "black" />
144
+ </ Pressable >
145
+ ) : (
146
+ < MaterialIcons
147
+ name = "delete-forever"
148
+ size = { 24 }
149
+ color = "black"
150
+ style = { { opacity : 0.3 } }
151
+ />
152
+ ) }
153
+ < View style = { { borderWidth : 1 , opacity : 0.1 , height : "50%" } } />
154
+ < Pressable onPress = { handleCheckbox } >
155
+ { isCheck ? (
156
+ < MaterialIcons name = "check-box" size = { 24 } color = "black" />
143
157
) : (
144
158
< MaterialIcons
145
- name = "delete-forever "
159
+ name = "check-box-outline-blank "
146
160
size = { 24 }
147
161
color = "black"
148
- style = { { opacity : 0.3 } }
149
162
/>
150
163
) }
151
- < View style = { { borderWidth : 1 , opacity : 0.1 , height : "50%" } } />
152
- < Pressable onPress = { handleCheckbox } >
153
- { isCheck ? (
154
- < MaterialIcons name = "check-box" size = { 24 } color = "black" />
155
- ) : (
156
- < MaterialIcons
157
- name = "check-box-outline-blank"
158
- size = { 24 }
159
- color = "black"
160
- />
161
- ) }
162
- </ Pressable >
163
- </ View >
164
+ </ Pressable >
164
165
</ View >
165
- { alertBox . message && (
166
- < View style = { { marginTop : - 10 } } >
167
- < AlertBox message = { alertBox . message } color = { alertBox . color } />
168
- </ View >
169
- ) }
166
+ </ View >
167
+ { alertBox . message && (
168
+ < View style = { { marginTop : - 10 } } >
169
+ < AlertBox message = { alertBox . message } color = { alertBox . color } />
170
+ </ View >
171
+ ) }
172
+ < View style = { styles . responseContainer } >
170
173
< ScrollView >
171
174
< View style = { styles . responseSubContainer } >
172
175
{ historyDb &&
@@ -232,7 +235,6 @@ const styles = StyleSheet.create({
232
235
borderBottomWidth : 2 ,
233
236
borderColor : "#CED0FF" ,
234
237
padding : 20 ,
235
- paddingTop : 60 ,
236
238
} ,
237
239
footer : { } ,
238
240
actionsContainer : {
@@ -249,15 +251,14 @@ const styles = StyleSheet.create({
249
251
iconContainer : { } ,
250
252
responseContainer : {
251
253
flex : 1 ,
252
- // padding: 20,
253
254
gap : 10 ,
254
255
} ,
255
256
responseSubContainer : {
256
257
flex : 1 ,
257
- paddingHorizontal : 20 ,
258
258
paddingBottom : 100 ,
259
259
gap : 5 ,
260
260
overflow : "scroll" ,
261
+ padding : 10
261
262
} ,
262
263
primeAction : {
263
264
padding : 10 ,
0 commit comments