Last active
December 15, 2023 08:41
-
-
Save alperbayram/a40afbb0ba28c0a899e0a1ea34330d3c to your computer and use it in GitHub Desktop.
users.tsx
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
//app/users.tsx | |
import { Text, View, Image } from "react-native"; | |
import { Link } from "expo-router"; | |
import { styles } from "../styles/styles"; | |
export default function Page() { | |
const avatar1 = "https://avatars.githubusercontent.com/u/9664363?v=4"; | |
const avatar2 = "https://avatars.githubusercontent.com/u/43719324?v=4"; | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.title}>users</Text> | |
<View> | |
<Text style={styles.subtitle}>app/users.tsx</Text> | |
<Text style={styles.subtitle}>Users</Text> | |
<View style={styles.screencontainer}> | |
<Link | |
href={{ | |
pathname: "/user/[id]", | |
params: { | |
id: "111", | |
name: "bacon", | |
company: "expo", | |
image: avatar1, | |
}, | |
}} | |
> | |
<Image source={{ uri: avatar1 }} style={styles.image} /> | |
</Link> | |
<Link | |
href={{ | |
pathname: "/user/[id]", | |
params: { | |
id: "222", | |
name: "alper", | |
company: "open to work", | |
image: avatar2, | |
}, | |
}} | |
> | |
<Image source={{ uri: avatar2 }} style={styles.image} /> | |
</Link> | |
</View> | |
</View> | |
<Link href="/"> | |
<Text style={styles.linktitle}>index</Text> | |
</Link> | |
</View> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment