1- import { View , Text , StyleSheet , Pressable } from "react-native " ;
1+ import { useDarkMode } from "@/context/DarkModeContext " ;
22import { useNavigation } from "@react-navigation/native" ;
3+ import { Pressable , StyleSheet , Text , View } from "react-native" ;
34
45export default function NotFoundScreen ( ) {
56 const navigation = useNavigation ( ) ;
7+ const { isDarkMode } = useDarkMode ( ) ;
68
79 return (
8- < View style = { styles . container } >
9- < Text style = { styles . title } > 404</ Text >
10- < Text style = { styles . subtitle } > Page not found</ Text >
10+ < View style = { [
11+ styles . container ,
12+ { backgroundColor : isDarkMode ? 'rgba(42, 42, 42, 1)' : '#ffffff' }
13+ ] } >
14+ < Text style = { [
15+ styles . title ,
16+ { color : isDarkMode ? '#F9FAFB' : '#111827' }
17+ ] } >
18+ 404
19+ </ Text >
20+ < Text style = { [
21+ styles . subtitle ,
22+ { color : isDarkMode ? '#9CA3AF' : '#6b7280' }
23+ ] } >
24+ Page not found
25+ </ Text >
1126
12- < Pressable onPress = { ( ) => navigation . goBack ( ) } style = { styles . button } >
13- < Text style = { styles . buttonText } > Go back</ Text >
27+ < Pressable
28+ onPress = { ( ) => navigation . goBack ( ) }
29+ style = { [
30+ styles . button ,
31+ { backgroundColor : isDarkMode ? '#4B5563' : '#000' }
32+ ] }
33+ >
34+ < Text style = { [
35+ styles . buttonText ,
36+ { color : isDarkMode ? '#F3F4F6' : '#fff' }
37+ ] } >
38+ Go back
39+ </ Text >
1440 </ Pressable >
1541 </ View >
1642 ) ;
@@ -22,7 +48,6 @@ const styles = StyleSheet.create({
2248 alignItems : "center" ,
2349 justifyContent : "center" ,
2450 padding : 24 ,
25- backgroundColor : "#fff" ,
2651 } ,
2752 title : {
2853 fontSize : 72 ,
@@ -31,17 +56,14 @@ const styles = StyleSheet.create({
3156 } ,
3257 subtitle : {
3358 fontSize : 18 ,
34- color : "#666" ,
3559 marginBottom : 24 ,
3660 } ,
3761 button : {
3862 paddingHorizontal : 20 ,
3963 paddingVertical : 12 ,
4064 borderRadius : 8 ,
41- backgroundColor : "#000" ,
4265 } ,
4366 buttonText : {
44- color : "#fff" ,
4567 fontSize : 16 ,
4668 fontWeight : "600" ,
4769 } ,
0 commit comments