2022-07-11 01:00:17 +00:00
|
|
|
import {DrawerNavigationProp} from '@react-navigation/drawer';
|
|
|
|
import {useNavigation} from '@react-navigation/native';
|
|
|
|
import {createStackNavigator} from '@react-navigation/stack';
|
|
|
|
import React from 'react';
|
|
|
|
import {IconButton} from 'react-native-paper';
|
|
|
|
import BestList from './BestList';
|
2022-09-24 06:47:31 +00:00
|
|
|
import {DrawerParamList} from './drawer-param-list';
|
2022-09-04 03:28:21 +00:00
|
|
|
import Set from './set';
|
2022-07-08 12:11:10 +00:00
|
|
|
import ViewBest from './ViewBest';
|
2022-07-03 01:50:01 +00:00
|
|
|
|
2022-07-11 01:00:17 +00:00
|
|
|
const Stack = createStackNavigator<BestPageParams>();
|
|
|
|
export type BestPageParams = {
|
|
|
|
BestList: {};
|
|
|
|
ViewBest: {
|
2022-09-04 03:28:21 +00:00
|
|
|
best: Set;
|
2022-07-11 01:00:17 +00:00
|
|
|
};
|
|
|
|
};
|
2022-07-04 04:03:48 +00:00
|
|
|
|
2022-07-11 01:00:17 +00:00
|
|
|
export default function BestPage() {
|
|
|
|
const navigation = useNavigation<DrawerNavigationProp<DrawerParamList>>();
|
2022-07-04 04:03:48 +00:00
|
|
|
|
2022-07-03 01:50:01 +00:00
|
|
|
return (
|
2022-07-11 01:00:17 +00:00
|
|
|
<Stack.Navigator
|
|
|
|
screenOptions={{headerShown: false, animationEnabled: false}}>
|
|
|
|
<Stack.Screen name="BestList" component={BestList} />
|
|
|
|
<Stack.Screen
|
|
|
|
name="ViewBest"
|
|
|
|
component={ViewBest}
|
|
|
|
listeners={{
|
|
|
|
beforeRemove: () => {
|
|
|
|
navigation.setOptions({
|
|
|
|
headerLeft: () => (
|
|
|
|
<IconButton icon="menu" onPress={navigation.openDrawer} />
|
|
|
|
),
|
2022-07-11 01:06:16 +00:00
|
|
|
title: 'Best',
|
2022-07-11 01:00:17 +00:00
|
|
|
});
|
|
|
|
},
|
2022-07-06 04:27:36 +00:00
|
|
|
}}
|
|
|
|
/>
|
2022-07-11 01:00:17 +00:00
|
|
|
</Stack.Navigator>
|
2022-07-03 01:50:01 +00:00
|
|
|
);
|
|
|
|
}
|