diff --git a/src/components/pages/direct.js b/src/components/pages/direct.js index 5248486..ebd26dd 100644 --- a/src/components/pages/direct.js +++ b/src/components/pages/direct.js @@ -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 - ? <> + ? { : <> } - + : <> } diff --git a/src/components/pages/direct/conversation.js b/src/components/pages/direct/conversation.js index a128620..d27c23d 100644 --- a/src/components/pages/direct/conversation.js +++ b/src/components/pages/direct/conversation.js @@ -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: "", diff --git a/src/components/pages/feed/older-posts.js b/src/components/pages/feed/older-posts.js index 8235483..5fbd001 100644 --- a/src/components/pages/feed/older-posts.js +++ b/src/components/pages/feed/older-posts.js @@ -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 ( - <> + { state.loaded ? <> { : <> } - + ); }; diff --git a/src/components/pages/publish.js b/src/components/pages/publish.js index 689bc64..84db5be 100644 --- a/src/components/pages/publish.js +++ b/src/components/pages/publish.js @@ -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 - ? <> - - - - - setState({ ...state, caption }) - } - style = { [ styles.form.input, { height: 100, } ] } /> + return state.loaded + ? + + + + + setState({ ...state, caption }) + } + style = { [ styles.form.input, { height: 100, } ] } /> - Visibility - - - + Visibility + + + - - - Publish - - - - - : <> - } - - ); + + + Publish + + + + + : <>; }; const SCREEN_WIDTH = Dimensions.get("window").width; diff --git a/src/components/pages/user-list.js b/src/components/pages/user-list.js index 519e814..94d11fb 100644 --- a/src/components/pages/user-list.js +++ b/src/components/pages/user-list.js @@ -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 ( - <> + { context ? @@ -55,7 +56,7 @@ const UserList = ({navigation}) => { ) } - + ); };