| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import {
- NavigationContainer,
- DefaultTheme,
- DarkTheme,
- } from '@react-navigation/native';
- import {
- createStackNavigator,
- CardStyleInterpolators,
- } from '@react-navigation/stack';
- import * as React from 'react';
- import { ColorSchemeName } from 'react-native';
- import useModel from 'flooks';
- import { useTranslation } from 'react-i18next';
- import { NoticeStackParamList } from '../types';
- import NoticeScreen from '../notice/NoticeScreen';
- const NoticeStack = createStackNavigator<NoticeStackParamList>();
- export default function Navigation({
- colorScheme,
- }: {
- colorScheme: ColorSchemeName;
- }) {
- const { t } = useTranslation();
- return (
- <NoticeStack.Navigator
- initialRouteName="Notice"
- screenOptions={{
- cardOverlayEnabled: true,
- cardStyle: { backgroundColor: '#f2f2f2', flex: 1 },
- contentStyle: { backgroundColor: '#f2f2f2', flex: 1 },
- gestureEnabled: true,
- stackPresentation: 'push',
- cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
- headerStyle: {
- backgroundColor: '#FFC21C',
- },
- headerTintColor: '#fff',
- headerTitleStyle: {
- fontWeight: 'bold',
- },
- headerTitleAlign: 'center',
- headerBackTitleVisible: false,
- }}
- >
- <NoticeStack.Screen
- name="Notice"
- component={NoticeScreen}
- options={{ title: t('qi-shou-shen-he') }}
- />
- </NoticeStack.Navigator>
- );
- }
|