Files
gitea-native/src/navigation/header-options.ts
T
JustZoe101 ad81db07b3 feat(app): React Navigation shell and i18next setup
- React Navigation 7: conditional root stack (Auth | Main | Repository |
  Settings | Accounts modal), 5 bottom tabs with nested native stacks
- typed param lists, deep-link config, header options, root-nav helper
- providers: gesture handler, safe area, theme, persisted query client, app lock
- i18next + expo-localization (en/nl), persisted language preference
2026-10-09 16:41:17 +02:00

25 lines
777 B
TypeScript

/**
* Shared native-stack screen options derived from the active theme, so every
* stack (tabs, repository, settings, accounts) renders identical headers.
*/
import { useMemo } from 'react';
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
import { useTheme } from '@/theme/theme-provider';
export function useStackScreenOptions(): NativeStackNavigationOptions {
const { colors } = useTheme();
return useMemo(
() => ({
headerStyle: { backgroundColor: colors.surface },
headerTintColor: colors.text,
headerTitleStyle: { color: colors.text },
headerShadowVisible: false,
headerBackButtonDisplayMode: 'minimal',
contentStyle: { backgroundColor: colors.background },
}),
[colors],
);
}