-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: login labels
- Loading branch information
Showing
15 changed files
with
346 additions
and
4,499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,30 @@ | ||
import { Link } from 'expo-router'; | ||
import { StyleSheet } from 'react-native'; | ||
|
||
import { Text, View } from '@/components/Themed'; | ||
import React from 'react'; | ||
import { Image } from 'expo-image'; | ||
|
||
export default function NotFoundScreen() { | ||
return ( | ||
<> | ||
<View style={styles.container}> | ||
<Text style={styles.title}>This screen doesn't exist.</Text> | ||
<View className="flex-1 justify-center items-center p-8"> | ||
<View className="h-60 w-full mb-10"> | ||
<Image | ||
source={require('@/assets/images/page_not_found.svg')} | ||
contentFit="contain" | ||
className="mb-6 justify-center items-end" | ||
style={{ width: '100%', flex: 1 }} | ||
/> | ||
</View> | ||
<Text className="text-2xl font-Inter-Bold dark:text-white text-center max-w-64"> | ||
Oops! We can't find the page you're looking for. | ||
</Text> | ||
|
||
<Link href="/" style={styles.link}> | ||
<Text style={styles.linkText}>Go to home screen!</Text> | ||
<Link href="/" className="mt-12"> | ||
<View className="py-4 px-6 bg-action-500 rounded-full"> | ||
<Text className="text-lg text-white">Go to home screen!</Text> | ||
</View> | ||
</Link> | ||
</View> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
padding: 20, | ||
}, | ||
title: { | ||
fontSize: 20, | ||
fontWeight: 'bold', | ||
}, | ||
link: { | ||
marginTop: 15, | ||
paddingVertical: 15, | ||
}, | ||
linkText: { | ||
fontSize: 14, | ||
color: '#2e78b7', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Text, View } from '@/components/Themed'; | ||
import { Href, Link, useLocalSearchParams, useRouter } from 'expo-router'; | ||
import { useEffect } from 'react'; | ||
import { Linking } from 'react-native'; | ||
import { useToast } from 'react-native-toast-notifications'; | ||
|
||
type RedirectParams = { | ||
path: string; | ||
dest: 'app' | 'web'; | ||
}; | ||
|
||
export default function Redirect() { | ||
const router = useRouter(); | ||
const toast = useToast(); | ||
const { path, dest } = useLocalSearchParams<RedirectParams>(); | ||
|
||
useEffect(() => { | ||
(async () => { | ||
if (!path) { | ||
router.replace('/'); | ||
return; | ||
} | ||
|
||
if (dest === 'web') { | ||
try { | ||
const url = path.startsWith('http') ? path : `https://${path}`; | ||
await Linking.openURL(url); | ||
} catch (error) { | ||
toast.show('Unable to open link', { | ||
type: 'danger', | ||
duration: 5000, | ||
placement: 'top', | ||
}); | ||
} | ||
} else { | ||
router.replace(path as Href); | ||
} | ||
})(); | ||
}, [path, dest]); | ||
|
||
return ( | ||
<View className="flex-1 items-center justify-center"> | ||
<Text className="text-xl dark:text-white">Redirecting...</Text> | ||
<Link href="/" className="mt-12"> | ||
<View className="py-3 px-4 bg-action-500 rounded-full"> | ||
<Text className="text-lg text-white">Go to home screen!</Text> | ||
</View> | ||
</Link> | ||
</View> | ||
); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.