feat(mobile): Add field app with date range navigation
- Add React Native Expo field app for mobile staff - Use main /appointments/ endpoint with date range support - Add X-Business-Subdomain header for tenant context - Support day/week view navigation - Remove WebSocket console logging from frontend - Update AppointmentStatus type to include all backend statuses - Add responsive status legend to scheduler header 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
38
mobile/field-app/app/_layout.tsx
Normal file
38
mobile/field-app/app/_layout.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Root Layout
|
||||
*
|
||||
* Sets up providers and global configuration.
|
||||
*/
|
||||
|
||||
import { Stack } from 'expo-router';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||
import { AuthProvider } from '../src/hooks/useAuth';
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: 2,
|
||||
staleTime: 1000 * 60 * 5, // 5 minutes
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AuthProvider>
|
||||
{/* translucent={false} ensures content doesn't render behind status bar on Android */}
|
||||
<StatusBar style="light" translucent={false} backgroundColor="#2563eb" />
|
||||
<Stack screenOptions={{ headerShown: false }}>
|
||||
<Stack.Screen name="index" />
|
||||
<Stack.Screen name="login" />
|
||||
<Stack.Screen name="(auth)" />
|
||||
</Stack>
|
||||
</AuthProvider>
|
||||
</QueryClientProvider>
|
||||
</SafeAreaProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user