working out top of profile page w name, email, image, and sign out button.
This commit is contained in:
@@ -123,8 +123,7 @@ export default function PostsScreen() {
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
wrapper: {
|
wrapper: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: '#25292e',
|
backgroundColor: '#25292e'
|
||||||
padding: 5
|
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|||||||
@@ -4,23 +4,28 @@ import { Image, StyleSheet, Text, View } from 'react-native'
|
|||||||
import { SignOutButton } from '../components/SignOutButton'
|
import { SignOutButton } from '../components/SignOutButton'
|
||||||
|
|
||||||
export default function PostsScreen() {
|
export default function PostsScreen() {
|
||||||
const user = useUser().user
|
const { user } = useUser()
|
||||||
console.log(user?.emailAddresses)
|
console.log(user?.imageUrl)
|
||||||
return (
|
return (
|
||||||
<View style={styles.wrapper}>
|
<>
|
||||||
<View>
|
<View style={styles.wrapper}>
|
||||||
<Image></Image>
|
<View style={styles.profileInfoCard}>
|
||||||
|
<View style={styles.profilePic}>
|
||||||
|
<Image source={{ uri: user?.imageUrl }} style={styles.image}></Image>
|
||||||
|
</View>
|
||||||
|
<View style={styles.nameContainer}>
|
||||||
|
<Text style={styles.text}>
|
||||||
|
{user?.firstName} {user?.lastName}
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.text}>{user?.emailAddresses[0].emailAddress}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={styles.buttonLayout}>
|
||||||
|
<SignOutButton></SignOutButton>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={styles.userPostsCard}></View>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.nameContainer}>
|
</>
|
||||||
<Text style={styles.text}>
|
|
||||||
{user?.firstName} {user?.lastName}
|
|
||||||
</Text>
|
|
||||||
<Text style={styles.text}>{user?.emailAddresses[0].emailAddress}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={styles.buttonLayout}>
|
|
||||||
<SignOutButton></SignOutButton>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,17 +33,45 @@ const styles = StyleSheet.create({
|
|||||||
wrapper: {
|
wrapper: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: '#25292e',
|
backgroundColor: '#25292e',
|
||||||
padding: 5
|
padding: 16
|
||||||
},
|
},
|
||||||
nameContainer: { display: 'flex', alignItems: 'center' },
|
profileInfoCard: {
|
||||||
|
backgroundColor: '#373d44ff',
|
||||||
|
flex: 0.25,
|
||||||
|
marginTop: 12,
|
||||||
|
borderColor: '#626e7aff',
|
||||||
|
borderStyle: 'solid',
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 12
|
||||||
|
},
|
||||||
|
profilePic: {
|
||||||
|
flex: 0.4,
|
||||||
|
marginTop: 12,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center'
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
height: 75,
|
||||||
|
width: 75
|
||||||
|
},
|
||||||
|
nameContainer: { flex: 0.3, display: 'flex', alignItems: 'center' },
|
||||||
text: {
|
text: {
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 6
|
marginTop: 6
|
||||||
},
|
},
|
||||||
buttonLayout: {
|
buttonLayout: {
|
||||||
flex: 1,
|
flex: 0.2,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginTop: 12
|
marginTop: 12
|
||||||
|
},
|
||||||
|
userPostsCard: {
|
||||||
|
backgroundColor: '#373d44ff',
|
||||||
|
flex: 0.75,
|
||||||
|
marginTop: 12,
|
||||||
|
borderColor: '#626e7aff',
|
||||||
|
borderStyle: 'solid',
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 12
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
3
app/components/Post.tsx
Normal file
3
app/components/Post.tsx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export const Post = () => {
|
||||||
|
return null
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ export const SignOutButton = () => {
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
button: {
|
button: {
|
||||||
width: '40%',
|
width: '40%',
|
||||||
height: '5%',
|
height: '100%',
|
||||||
backgroundColor: 'rgba(192, 196, 199, 1)',
|
backgroundColor: 'rgba(192, 196, 199, 1)',
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { SignedIn, SignedOut, useUser } from '@clerk/clerk-expo'
|
import { SignedIn, SignedOut } from '@clerk/clerk-expo'
|
||||||
import { Redirect } from 'expo-router'
|
import { Redirect } from 'expo-router'
|
||||||
import { View } from 'react-native'
|
import { View } from 'react-native'
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const { user } = useUser()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<SignedIn>
|
<SignedIn>
|
||||||
|
|||||||
Reference in New Issue
Block a user