Last active
December 15, 2023 08:36
-
-
Save alperbayram/84044f0bab00ec79535514ecd95a97dc to your computer and use it in GitHub Desktop.
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
//user/[id].tsx | |
import { View, Text, Image, TouchableOpacity } from "react-native"; | |
import { useLocalSearchParams, router, usePathname } from "expo-router"; | |
import { styles } from "../../styles/styles"; | |
export default function Page() { | |
const pathname = usePathname(); | |
const local = useLocalSearchParams(); | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.title}>user</Text> | |
<Image source={{ uri: local.image }} style={styles.image} /> | |
<View> | |
<Text style={styles.subtitle}>id: {local.id}</Text> | |
<Text style={styles.subtitle}>Name: {local.name}</Text> | |
<Text style={styles.subtitle}>Company: {local.company}</Text> | |
<Text style={styles.subtitle}>pathname: app{pathname}</Text> | |
</View> | |
<TouchableOpacity onPress={router.back}> | |
<Text style={styles.linktitle}>{"< "}Back</Text> | |
</TouchableOpacity> | |
</View> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment