Adding support to youtube videos.
This commit is contained in:
@@ -2,13 +2,22 @@ import React from "react";
|
||||
import { View, ImageBackground } from "react-native";
|
||||
import { Text, TextInput, Button, Divider, Checkbox } from "react-native-paper";
|
||||
import i18n from "../i18nMessages.js";
|
||||
import { useSnapshot } from 'valtio';
|
||||
import GlobalState from '../contexts/GlobalState.js';
|
||||
import API from "../API";
|
||||
|
||||
|
||||
let InviteView = ()=>{
|
||||
const gState = useSnapshot(GlobalState);
|
||||
const viewer = gState.me;
|
||||
const [name, setName] = React.useState("");
|
||||
const [email, setEmail] = React.useState("");
|
||||
const [checked, setChecked] = React.useState("");
|
||||
|
||||
let sendInvite = async () => {
|
||||
if(name != "" && email != "") return 0;
|
||||
setName('');
|
||||
setEmail('');
|
||||
setChecked(false);
|
||||
await API.newInvitation(name, email);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{
|
||||
padding: 10,
|
||||
@@ -22,16 +31,20 @@ let InviteView = ()=>{
|
||||
<TextInput
|
||||
label={i18n.t("message.name")}
|
||||
style={{backgroundColor:"rgba(0,0,0,0)"}}
|
||||
value={''}
|
||||
//onChangeText={text => setText(text)}
|
||||
value={name}
|
||||
onChangeText={text => setName(text)}
|
||||
/>
|
||||
<TextInput
|
||||
label={i18n.t("message.email")}
|
||||
style={{backgroundColor:"rgba(0,0,0,0)"}}
|
||||
value={''}
|
||||
//onChangeText={text => setText(text)}
|
||||
value={email}
|
||||
onChangeText={text => setEmail(text)}
|
||||
/>
|
||||
<Checkbox.Item
|
||||
label={i18n.t("message.IKnowThisPerson")}
|
||||
status={checked ? "checked" : "unchecked"}
|
||||
onPress={()=>{setChecked(!checked)}}
|
||||
/>
|
||||
<Checkbox.Item label={i18n.t("message.IKnowThisPerson")} status="checked" />
|
||||
<Divider />
|
||||
<Button mode="outlined">Invite</Button>
|
||||
</ImageBackground>
|
||||
|
||||
Reference in New Issue
Block a user