fixing sing up flow now using an email code to verify.. on sign up we create user in backend that has reference to clerkID for filtering posts later
This commit is contained in:
@@ -56,10 +56,16 @@ export const PostComponent: React.FC<PostComponentProps> = ({ post, fetchData })
|
||||
<Text style={{ color: '#fff' }}>{post.notes}</Text>
|
||||
{user?.publicMetadata.role !== 'admin' && (
|
||||
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 10 }}>
|
||||
{post.status === StatusEnum.Created && <Text style={styles.created}>Created</Text>}
|
||||
{post.status === StatusEnum.Pending && <Text style={styles.pending}>Pending</Text>}
|
||||
{post.status === StatusEnum.Denied && <Text style={styles.denied}>Denied</Text>}
|
||||
{post.status === StatusEnum.Accepted && <Text style={styles.accepted}>Accepted</Text>}
|
||||
{post.status === StatusEnum.Created && (
|
||||
<Text style={[styles.created, styles.statusTag]}>Created</Text>
|
||||
)}
|
||||
{post.status === StatusEnum.Pending && (
|
||||
<Text style={[styles.pending, styles.statusTag]}>Pending</Text>
|
||||
)}
|
||||
{post.status === StatusEnum.Denied && <Text style={[styles.denied, styles.statusTag]}>Denied</Text>}
|
||||
{post.status === StatusEnum.Approved && (
|
||||
<Text style={[styles.approved, styles.statusTag]}>Approved</Text>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
{user?.publicMetadata.role === 'admin' && (
|
||||
@@ -111,8 +117,9 @@ const styles = StyleSheet.create({
|
||||
padding: 10,
|
||||
width: '100%'
|
||||
},
|
||||
created: { color: 'white' },
|
||||
pending: { color: 'yellow' },
|
||||
denied: { color: 'red' },
|
||||
accepted: { color: 'green' }
|
||||
statusTag: { paddingVertical: 3, paddingHorizontal: 10, borderRadius: 6 },
|
||||
created: { backgroundColor: '#0d6efd', color: '#ffffff' },
|
||||
pending: { backgroundColor: '#ffc107', color: '#000000' },
|
||||
denied: { backgroundColor: '#dc3545', color: '#ffffff' },
|
||||
approved: { backgroundColor: '#198754', color: '#ffffff' }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user