Finish wrapping pages
This commit is contained in:
parent
00414df2a3
commit
f889540ba5
|
@ -1,5 +1,6 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
ScrollView,
|
||||
View,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
|
@ -142,7 +143,7 @@ const Direct = ({ navigation }) => {
|
|||
return (
|
||||
<>
|
||||
{ state.loaded
|
||||
? <>
|
||||
? <ScrollView>
|
||||
<View style = { [ styles.row, styles.form.container ] }>
|
||||
<TextInput
|
||||
placeholder = "Search..."
|
||||
|
@ -182,7 +183,7 @@ const Direct = ({ navigation }) => {
|
|||
: <></>
|
||||
}
|
||||
</>
|
||||
</>
|
||||
</ScrollView>
|
||||
: <></>
|
||||
}
|
||||
</>
|
||||
|
|
|
@ -110,7 +110,7 @@ const Compose = ({ navigation }) => {
|
|||
};
|
||||
|
||||
const Conversation = ({ navigation }) => {
|
||||
const conversation = navigation.getParam("conversation", {});
|
||||
const conversation = route.params.conversation
|
||||
const [state, setState] = useState({
|
||||
loaded: false,
|
||||
newMessage: "",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { ScrollView } from "react-native";
|
||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||
|
||||
import * as requests from "src/requests";
|
||||
|
@ -56,7 +57,7 @@ const OlderPosts = (props) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ScrollView>
|
||||
{ state.loaded
|
||||
? <>
|
||||
<PagedGrid
|
||||
|
@ -66,7 +67,7 @@ const OlderPosts = (props) => {
|
|||
</>
|
||||
: <></>
|
||||
}
|
||||
</>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
ScrollView,
|
||||
Dimensions,
|
||||
View,
|
||||
Image,
|
||||
|
@ -126,62 +127,57 @@ const Publish = ({ navigation }) => {
|
|||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{ state.loaded
|
||||
? <>
|
||||
<View style = { styles.preview.container }>
|
||||
<Image
|
||||
style = {[
|
||||
styles.preview.image,
|
||||
{
|
||||
width: state.image.width,
|
||||
height: state.image.height,
|
||||
},
|
||||
]}
|
||||
source = { { uri: state.image.data.uri } } />
|
||||
</View>
|
||||
<View style = { styles.form.container }>
|
||||
<TextInput
|
||||
placeholder = "Caption this post..."
|
||||
value = { state.caption }
|
||||
multiline
|
||||
autoFocus
|
||||
onChangeText = {
|
||||
caption => setState({ ...state, caption })
|
||||
}
|
||||
style = { [ styles.form.input, { height: 100, } ] } />
|
||||
return state.loaded
|
||||
? <ScrollView>
|
||||
<View style = { styles.preview.container }>
|
||||
<Image
|
||||
style = {[
|
||||
styles.preview.image,
|
||||
{
|
||||
width: state.image.width,
|
||||
height: state.image.height,
|
||||
},
|
||||
]}
|
||||
source = { { uri: state.image.data.uri } } />
|
||||
</View>
|
||||
<View style = { styles.form.container }>
|
||||
<TextInput
|
||||
placeholder = "Caption this post..."
|
||||
value = { state.caption }
|
||||
multiline
|
||||
autoFocus
|
||||
onChangeText = {
|
||||
caption => setState({ ...state, caption })
|
||||
}
|
||||
style = { [ styles.form.input, { height: 100, } ] } />
|
||||
|
||||
<Text style = { styles.form.label }>Visibility</Text>
|
||||
<Selector
|
||||
visibility = "public"
|
||||
active = { state.visibility }
|
||||
icon = "globe-outline"
|
||||
message = "Anyone can see this post" />
|
||||
<Selector
|
||||
visibility = "unlisted"
|
||||
active = { state.visibility }
|
||||
icon = "lock-open-outline"
|
||||
message = "Keep this post off public timelines" />
|
||||
<Selector
|
||||
visibility = "private"
|
||||
active = { state.visibility }
|
||||
icon = "lock-closed-outline"
|
||||
message = "Only share this with my followers" />
|
||||
<Text style = { styles.form.label }>Visibility</Text>
|
||||
<Selector
|
||||
visibility = "public"
|
||||
active = { state.visibility }
|
||||
icon = "globe-outline"
|
||||
message = "Anyone can see this post" />
|
||||
<Selector
|
||||
visibility = "unlisted"
|
||||
active = { state.visibility }
|
||||
icon = "lock-open-outline"
|
||||
message = "Keep this post off public timelines" />
|
||||
<Selector
|
||||
visibility = "private"
|
||||
active = { state.visibility }
|
||||
icon = "lock-closed-outline"
|
||||
message = "Only share this with my followers" />
|
||||
|
||||
<TouchableOpacity
|
||||
onPress = { _handlePublish }
|
||||
style = { styles.form.button.container }>
|
||||
<Text style = { styles.form.button.label }>
|
||||
Publish
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</>
|
||||
: <></>
|
||||
}
|
||||
</>
|
||||
);
|
||||
<TouchableOpacity
|
||||
onPress = { _handlePublish }
|
||||
style = { styles.form.button.container }>
|
||||
<Text style = { styles.form.button.label }>
|
||||
Publish
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</ScrollView>
|
||||
: <></>;
|
||||
};
|
||||
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React from "react";
|
||||
import {
|
||||
ScrollView,
|
||||
SafeAreaView,
|
||||
View,
|
||||
Image,
|
||||
|
@ -10,12 +11,12 @@ import {
|
|||
|
||||
import ModerateMenu from "src/components/moderate-menu.js";
|
||||
|
||||
const UserList = ({navigation}) => {
|
||||
const data = navigation.getParam("data", [])
|
||||
const context = navigation.getParam("context", "");
|
||||
const UserList = ({ navigation, route}) => {
|
||||
const data = route.params.data;
|
||||
const context = route.params.context;
|
||||
|
||||
return (
|
||||
<>
|
||||
<ScrollView>
|
||||
{
|
||||
context ?
|
||||
<Text style = { styles.context }>
|
||||
|
@ -55,7 +56,7 @@ const UserList = ({navigation}) => {
|
|||
</View>
|
||||
)
|
||||
}
|
||||
</>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue