import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { Button } from 'react-native-paper'; import { useSafeArea } from 'react-native-safe-area-context'; import { RouteProp, ParamListBase } from '@react-navigation/native'; import { createStackNavigator, StackNavigationProp, TransitionPresets, } from '@react-navigation/stack'; import Article from '../Shared/Article'; import Albums from '../Shared/Albums'; type SimpleStackParams = { article: { author: string }; album: undefined; }; type SimpleStackNavigation = StackNavigationProp; const ArticleScreen = ({ navigation, route, }: { navigation: SimpleStackNavigation; route: RouteProp; }) => { const insets = useSafeArea(); return (
); }; const AlbumsScreen = ({ navigation, }: { navigation: SimpleStackNavigation; }) => { const insets = useSafeArea(); return ( ); }; const ModalPresentationStack = createStackNavigator(); type Props = { options?: React.ComponentProps; navigation: StackNavigationProp; }; export default function SimpleStackScreen({ navigation, options }: Props) { navigation.setOptions({ headerShown: false, }); return ( ({ title: `Article by ${route.params.author}`, })} initialParams={{ author: 'Gandalf' }} /> ); } const styles = StyleSheet.create({ buttons: { flexDirection: 'row', padding: 8, }, button: { margin: 8, }, });