Update CBS Mobile App codebase
This commit is contained in:
@@ -6,16 +6,19 @@ import CardDetailsScreen from '../modules/cards/screens/CardDetailsScreen';
|
||||
import RequestPhysicalCardScreen from '../modules/cards/screens/RequestPhysicalCardScreen';
|
||||
import ApplyCreditCardScreen from '../modules/cards/screens/ApplyCreditCardScreen';
|
||||
import type { CardsStackParamList } from './types';
|
||||
import { CARDS_ROUTE_FEATURES, useRouteGuard } from './featureRoutes';
|
||||
|
||||
const Stack = createNativeStackNavigator<CardsStackParamList>();
|
||||
|
||||
export const CardsNavigator = () => {
|
||||
const canRoute = useRouteGuard(CARDS_ROUTE_FEATURES);
|
||||
|
||||
return (
|
||||
<Stack.Navigator screenOptions={{ headerShown: false }}>
|
||||
<Stack.Screen name="CardsOverview" component={CardsOverviewScreen} />
|
||||
<Stack.Screen name="CardDetails" component={CardDetailsScreen} />
|
||||
<Stack.Screen name="RequestPhysicalCard" component={RequestPhysicalCardScreen} />
|
||||
<Stack.Screen name="ApplyCreditCard" component={ApplyCreditCardScreen} />
|
||||
{canRoute('CardsOverview') && <Stack.Screen name="CardsOverview" component={CardsOverviewScreen} />}
|
||||
{canRoute('CardDetails') && <Stack.Screen name="CardDetails" component={CardDetailsScreen} />}
|
||||
{canRoute('RequestPhysicalCard') && <Stack.Screen name="RequestPhysicalCard" component={RequestPhysicalCardScreen} />}
|
||||
{canRoute('ApplyCreditCard') && <Stack.Screen name="ApplyCreditCard" component={ApplyCreditCardScreen} />}
|
||||
</Stack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user