diff --git a/src/constants/routeNames.js b/src/constants/routeNames.js index efbbfca3c..6bc3e902f 100644 --- a/src/constants/routeNames.js +++ b/src/constants/routeNames.js @@ -30,7 +30,6 @@ export default { ACCOUNT_BOOST: `AccountBoost${SCREEN_SUFFIX}`, COMMUNITY: `Community${SCREEN_SUFFIX}`, COMMUNITIES: `Communities${SCREEN_SUFFIX}`, - YOUTUBE: `YouTube${SCREEN_SUFFIX}`, WEB_BROWSER: `WebBrowser${SCREEN_SUFFIX}`, }, DRAWER: { diff --git a/src/navigation/routes.js b/src/navigation/routes.js index f897d59a9..213ef1ba8 100644 --- a/src/navigation/routes.js +++ b/src/navigation/routes.js @@ -40,7 +40,6 @@ import { Communities, WebBrowser, } from '../screens'; -import YoutubePlayer from '../screens/youtube/youtubePlayer'; const bottomTabNavigator = createBottomTabNavigator( { @@ -152,7 +151,6 @@ const stackNavigator = createStackNavigator( [ROUTES.SCREENS.ACCOUNT_BOOST]: { screen: AccountBoost }, [ROUTES.SCREENS.COMMUNITY]: { screen: Community }, [ROUTES.SCREENS.COMMUNITIES]: { screen: Communities }, - [ROUTES.SCREENS.YOUTUBE]: { screen: YoutubePlayer }, [ROUTES.SCREENS.WEB_BROWSER]: { screen: WebBrowser }, }, { diff --git a/src/screens/youtube/youtubePlayer.tsx b/src/screens/youtube/youtubePlayer.tsx deleted file mode 100644 index 591b1180d..000000000 --- a/src/screens/youtube/youtubePlayer.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import { View } from 'react-native'; -import YouTube from 'react-native-youtube'; - -const YoutubePlayer = ({navigation}) => { - - const videoId = navigation.getParam('videoId'); - - if(!videoId){ - throw new Error("Please pass videoId"); - } - - return ( - - { - - }} - onChangeFullscreen={(e)=>{ - if(!e.isFullscreen){ - navigation.goBack(); - } - }} - onError={e => { - navigation.goBack(); - }} - style={{ alignSelf: 'stretch', height: '90%', backgroundColor:'black' }} - origin="http://www.youtube.com" - /> - - ) -}; - - -export default YoutubePlayer - -