/** * 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], ); }