Fix prettier problems

This commit is contained in:
Tiago Jacobs 2022-04-16 18:48:49 -03:00
parent 8f48cda6b7
commit 115fb7f9a3

View File

@ -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();
@ -81,19 +81,22 @@ 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 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){
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) => (
<WrapperItemListText onPress={() => onPress(namePortal)}>
@ -164,9 +167,11 @@ export const ListPortals = ({navigation}: IListPortalsDTO) => {
<TextWithoutPortal>
{i18next.t('mobileApp.portals.list.empty.addFirstPortal.label')}
</TextWithoutPortal>
<TouchableOpacity onPress={()=>onPressTextCreateDemoServer()}>
<TouchableOpacity onPress={() => onPressTextCreateDemoServer()}>
<TextWithoutPortal color={true}>
{i18next.t('mobileApp.portals.list.empty.orUseOurDemoServer.label')}
{i18next.t(
'mobileApp.portals.list.empty.orUseOurDemoServer.label',
)}
</TextWithoutPortal>
</TouchableOpacity>
</>