Skip to content

Commit

Permalink
For now, use single screen setup for TV and web platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanhaevre committed Mar 26, 2024
1 parent 1e27324 commit c57bd17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as React from 'react';
import {NavigationContainer, DarkTheme} from '@react-navigation/native';
import BottomTabNavigator from "./navigators/BottomTabNavigator";
import {Platform} from "react-native";
import SampleExtendedScreen from "./screens/SampleExtendedScreen";

export default function App() {

Expand All @@ -13,9 +15,12 @@ export default function App() {
},
};

const singleScreen = Platform.isTV || Platform.OS === 'web';

return (
<NavigationContainer theme={navTheme}>
<BottomTabNavigator />
{!singleScreen && (<BottomTabNavigator/>)}
{singleScreen && (<SampleExtendedScreen/>)}
</NavigationContainer>
);
}

0 comments on commit c57bd17

Please sign in to comment.