diff --git a/react-native/app/pages/list_portals/component.tsx b/react-native/app/pages/list_portals/component.tsx index de2a59a..9e874aa 100644 --- a/react-native/app/pages/list_portals/component.tsx +++ b/react-native/app/pages/list_portals/component.tsx @@ -22,8 +22,8 @@ import {IHandles} from 'react-native-modalize/lib/options'; import {IItem, IItemDelete, IListPortalsDTO} from './types'; import i18next from 'i18next'; import {initTranslation} from '../../translations/index'; -import { TouchableOpacity } from 'react-native'; -import { new_portal_name_and_url } from '../utils/new_portal_name_and_url'; +import {TouchableOpacity} from 'react-native'; +import {new_portal_name_and_url} from '../utils/new_portal_name_and_url'; export const ListPortals = ({navigation}: IListPortalsDTO) => { initTranslation(); @@ -80,20 +80,23 @@ export const ListPortals = ({navigation}: IListPortalsDTO) => { }; const onPress = (namePortal: string) => navigation.navigate(namePortal); - - const onPressTextCreateDemoServer = async ()=>{ - const nameDemoServer = "Demo Server"; - const urlDemoServer = "https://bigbluebutton.org" - const createDemoServerOrError = await new_portal_name_and_url(nameDemoServer, urlDemoServer) - console.log(createDemoServerOrError) - if(createDemoServerOrError){ + const onPressTextCreateDemoServer = async () => { + const nameDemoServer = 'Demo Server'; + const urlDemoServer = 'https://demo-ios.bigbluebutton.org'; + + const createDemoServerOrError = await new_portal_name_and_url( + nameDemoServer, + urlDemoServer, + ); + console.log(createDemoServerOrError); + if (createDemoServerOrError) { setPortals(createDemoServerOrError); navigation.navigate(nameDemoServer); } else { - console.log("error when go create demo server") + console.log('error when go create demo server'); } - } + }; const Item = ({namePortal, url}: IItem) => ( onPress(namePortal)}> @@ -162,11 +165,13 @@ export const ListPortals = ({navigation}: IListPortalsDTO) => { ) : ( <> - {i18next.t('mobileApp.portals.list.empty.addFirstPortal.label')} + {i18next.t('mobileApp.portals.list.empty.addFirstPortal.label')} - onPressTextCreateDemoServer()}> + onPressTextCreateDemoServer()}> - {i18next.t('mobileApp.portals.list.empty.orUseOurDemoServer.label')} + {i18next.t( + 'mobileApp.portals.list.empty.orUseOurDemoServer.label', + )}