mirror of
http://88.130.71.182:3000/BlitTech/contexta_mb.git
synced 2026-06-13 10:45:33 +00:00
Initial commit
This commit is contained in:
60
src/navigation/RootNavigator.tsx
Normal file
60
src/navigation/RootNavigator.tsx
Normal file
@@ -0,0 +1,60 @@
|
||||
import React from 'react';
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||
import { RootStackParamList } from './types';
|
||||
import { AppNavigator } from './AppNavigator';
|
||||
import { LoginScreen } from '../screens/auth/LoginScreen';
|
||||
import { SignupScreen } from '../screens/auth/SignupScreen';
|
||||
import { ForgotPasswordScreen } from '../screens/auth/ForgotPasswordScreen';
|
||||
import { useTheme } from '../theme';
|
||||
import { COLORS } from '../theme';
|
||||
|
||||
const Stack = createNativeStackNavigator<RootStackParamList>();
|
||||
|
||||
export function RootNavigator() {
|
||||
const { theme } = useTheme();
|
||||
|
||||
return (
|
||||
<Stack.Navigator>
|
||||
{/* Tabs are always the base — marketplace is public */}
|
||||
<Stack.Screen name="Main" component={AppNavigator} options={{ headerShown: false }} />
|
||||
|
||||
{/* Auth screens slide up as modals from any tab */}
|
||||
<Stack.Screen
|
||||
name="Login"
|
||||
component={LoginScreen}
|
||||
options={{
|
||||
presentation: 'modal',
|
||||
headerShown: true,
|
||||
title: 'Sign In',
|
||||
headerStyle: { backgroundColor: theme.surface },
|
||||
headerTintColor: COLORS.primary,
|
||||
headerTitleStyle: { color: theme.text },
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Signup"
|
||||
component={SignupScreen}
|
||||
options={{
|
||||
presentation: 'modal',
|
||||
headerShown: true,
|
||||
title: 'Create Account',
|
||||
headerStyle: { backgroundColor: theme.surface },
|
||||
headerTintColor: COLORS.primary,
|
||||
headerTitleStyle: { color: theme.text },
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ForgotPassword"
|
||||
component={ForgotPasswordScreen}
|
||||
options={{
|
||||
presentation: 'modal',
|
||||
headerShown: true,
|
||||
title: 'Reset Password',
|
||||
headerStyle: { backgroundColor: theme.surface },
|
||||
headerTintColor: COLORS.primary,
|
||||
headerTitleStyle: { color: theme.text },
|
||||
}}
|
||||
/>
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user