edit app navigator
This commit is contained in:
@@ -15,14 +15,12 @@ interface AppNavigatorProps {
|
|||||||
|
|
||||||
// Main navigation component
|
// Main navigation component
|
||||||
const AppNavigator = ({ clearScanData }: AppNavigatorProps) => {
|
const AppNavigator = ({ clearScanData }: AppNavigatorProps) => {
|
||||||
const renderCustomTabBar = (props) => <CustomTabBar {...props} clearScanData={clearScanData} />;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// Wrap the navigator in a NavigationContainer to manage the navigation tree
|
// Wrap the navigator in a NavigationContainer to manage the navigation tree
|
||||||
<NavigationContainer>
|
<NavigationContainer>
|
||||||
|
|
||||||
{/* Define the tab navigator with custom tab bar and initial route */}
|
{/* Define the tab navigator with custom tab bar and initial route */}
|
||||||
<Tab.Navigator initialRouteName="QR Scanner" tabBar={renderCustomTabBar}>
|
<Tab.Navigator initialRouteName="QR Scanner" tabBar={props => <CustomTabBar {...props} clearScanData={clearScanData} />}>
|
||||||
|
|
||||||
{/* Define each tab with a name and corresponding component */}
|
{/* Define each tab with a name and corresponding component */}
|
||||||
<Tab.Screen name="History" component={HistoryScreen} />
|
<Tab.Screen name="History" component={HistoryScreen} />
|
||||||
|
|||||||
Reference in New Issue
Block a user