re-init amplify

This commit is contained in:
heyethereum
2024-07-07 20:21:32 +08:00
parent 47d1867cab
commit 9d7fe48e98
77 changed files with 5040 additions and 349 deletions

View File

@@ -8,15 +8,21 @@ import CustomTabBar from '../components/CustomTabBar';
// Create a bottom tab navigator
const Tab = createBottomTabNavigator();
// Define custom props for CustomTabBar
interface AppNavigatorProps {
clearScanData: () => void;
}
// Main navigation component
const AppNavigator = () => {
const AppNavigator = ({ clearScanData }: AppNavigatorProps) => {
const renderCustomTabBar = (props) => <CustomTabBar {...props} clearScanData={clearScanData} />;
return (
// Wrap the navigator in a NavigationContainer to manage the navigation tree
<NavigationContainer>
{/* Define the tab navigator with custom tab bar and initial route */}
<Tab.Navigator initialRouteName="QR Scanner" tabBar={props => <CustomTabBar {...props} />}>
<Tab.Navigator initialRouteName="QR Scanner" tabBar={renderCustomTabBar}>
{/* Define each tab with a name and corresponding component */}
<Tab.Screen name="History" component={HistoryScreen} />