diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx index d7402e9ad8..8d5f8b7979 100644 --- a/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx +++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx @@ -7,6 +7,7 @@ import { StyleSheet, Text, View, + ViewStyle, } from 'react-native'; import { appTheme } from '../../theme'; import { useAppGlobalStoreValue } from '../../contexts/AppContext'; @@ -15,6 +16,7 @@ import { Button } from '../../components/Button'; import { randomId } from '../../modules/helpers/randomId'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { LiveStreamParamList } from '../../../types'; +import { useOrientation } from '../../hooks/useOrientation'; type JoinLiveStreamScreenProps = NativeStackScreenProps< LiveStreamParamList, @@ -29,6 +31,7 @@ export const JoinLiveStream = ({ const userId = useAppGlobalStoreValue((store) => store.userId); const userName = useAppGlobalStoreValue((store) => store.userName); const { t } = useI18n(); + const orientation = useOrientation(); const { params: { mode }, } = route; @@ -44,46 +47,54 @@ export const JoinLiveStream = ({ navigation.navigate('ViewerLiveStream', { callId }); }; + const landScapeStyles: ViewStyle = { + flexDirection: orientation === 'landscape' ? 'row' : 'column', + }; + return ( - - - - {t('Hello, {{ userName }}', { userName: userName || userId })} - - - {mode === 'host' - ? t('Start a live stream by entering the call ID.') - : t('Join/View a live stream by entering the call ID.')} - + + + + + {t('Hello, {{ userName }}', { userName: userName || userId })} + + + {mode === 'host' + ? t('Start a live stream by entering the call ID.') + : t('Join/View a live stream by entering the call ID.')} + + - - { - setCallId(text.trim().split(' ').join('-')); - }} - /> + + + { + setCallId(text.trim().split(' ').join('-')); + }} + /> + + {mode === 'host' ? ( +