import React, { useContext } from 'react'; import { createStackNavigator } from '@react-navigation/stack'; import { defaultHeader, themedHeader } from '../../lib/methods/helpers/navigation'; import { ThemeContext } from '../../theme'; // Outside Stack import WithoutServersView from '../../views/WithoutServersView'; // Inside Stack import ShareListView from '../../views/ShareListView'; import ShareView from '../../views/ShareView'; import SelectServerView from '../../views/SelectServerView'; import AuthLoadingView from '../../views/AuthLoadingView'; import { ShareAppStackParamList, ShareInsideStackParamList, ShareOutsideStackParamList } from './types'; const Inside = createStackNavigator(); const InsideStack = () => { const { theme } = useContext(ThemeContext); const screenOptions = { ...defaultHeader, ...themedHeader(theme) }; screenOptions.headerStyle = { ...screenOptions.headerStyle, height: 57 }; return ( ); }; const Outside = createStackNavigator(); const OutsideStack = () => { const { theme } = useContext(ThemeContext); return ( ); }; // App const Stack = createStackNavigator(); const ShareExtensionStack = ({ root }: { root: string }): React.ReactElement => ( <> {!root ? : null} {root === 'outside' ? : null} {root === 'inside' ? : null} ); export default ShareExtensionStack;