mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
Refactor admin approval handling by introducing PendingApprovalView component for consistent messaging across screens
This commit is contained in:
1 parent
f69ead8e45
commit
191eb8944c
5 files changed
+106
-20
No files matched your search
@@ -3,6 +3,7 @@ import {ActivityIndicator, Alert, Pressable, ScrollView, StyleSheet, Text, View}
|
||||
import Screen from '../layout/Screen';
|
||||
import Card from '../UI/Card';
|
||||
import {Button} from '../UI/Button';
|
||||
import PendingApprovalView from '../UI/PendingApprovalView';
|
||||
import useGameHook from '../../hooks/useGameHook';
|
||||
import {getSession} from '../../hooks/SessionStore';
|
||||
|
||||
@@ -185,11 +186,7 @@ const LeaderboardScreen = ({navigation, route}) => {
|
||||
}
|
||||
|
||||
if (session.isPendingAdmin && !session.isAcceptedAdmin) {
|
||||
return (
|
||||
<Screen style={styles.center}>
|
||||
<Text style={styles.body}>Waiting for admin approval. You will get access once approved.</Text>
|
||||
</Screen>
|
||||
);
|
||||
return <PendingApprovalView/>;
|
||||
}
|
||||
|
||||
if (isBusiness && isAdmin && !selectedDepartment) {
|
||||
|
||||
Reference in new issue
Block a user