2024-05-11 12:50:06 -04:00
|
|
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
2024-05-20 10:54:13 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
2024-05-17 10:01:12 -04:00
|
|
|
import navigationStyle from '../components/navigationStyle';
|
|
|
|
import { useTheme } from '../components/themes';
|
2024-05-20 10:54:13 +01:00
|
|
|
import loc from '../loc'; // Assuming 'loc' is used for localization
|
|
|
|
import { PaymentCodeComponent, PaymentCodesListComponent } from './LazyLoadPaymentCodeStack';
|
2024-05-11 12:50:06 -04:00
|
|
|
|
|
|
|
export type PaymentCodeStackParamList = {
|
|
|
|
PaymentCode: { paymentCode: string };
|
|
|
|
PaymentCodesList: { walletID: string };
|
|
|
|
};
|
|
|
|
|
|
|
|
const Stack = createNativeStackNavigator<PaymentCodeStackParamList>();
|
|
|
|
|
|
|
|
const PaymentCodeStackRoot = () => {
|
2024-05-17 10:01:12 -04:00
|
|
|
const theme = useTheme();
|
|
|
|
|
2024-05-11 12:50:06 -04:00
|
|
|
return (
|
|
|
|
<Stack.Navigator screenOptions={{ headerShadowVisible: false }} initialRouteName="PaymentCode">
|
2024-05-17 10:01:12 -04:00
|
|
|
<Stack.Screen
|
|
|
|
name="PaymentCode"
|
|
|
|
component={PaymentCodeComponent}
|
|
|
|
options={navigationStyle({ title: loc.bip47.payment_code, closeButton: true })(theme)}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name="PaymentCodesList"
|
|
|
|
component={PaymentCodesListComponent}
|
|
|
|
options={navigationStyle({ title: loc.bip47.contacts, closeButton: true })(theme)}
|
|
|
|
/>
|
2024-05-11 12:50:06 -04:00
|
|
|
</Stack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default PaymentCodeStackRoot;
|