From d3690b3813a9da5a6f5eec7d5fe199cd76cea0b0 Mon Sep 17 00:00:00 2001 From: Aerin Date: Mon, 12 Jul 2021 21:02:24 +0800 Subject: [PATCH 1/2] fix errors on expo mobile app --- index.d.ts | 1 + navigation/index.tsx | 7 ++----- package-lock.json | 9 +++++++++ screens/TabOneScreen.tsx | 5 ++--- 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..48fb0f4 --- /dev/null +++ b/index.d.ts @@ -0,0 +1 @@ +declare module 'lodash'; \ No newline at end of file diff --git a/navigation/index.tsx b/navigation/index.tsx index ed2603d..8c13c87 100644 --- a/navigation/index.tsx +++ b/navigation/index.tsx @@ -48,15 +48,12 @@ function RootNavigator() { .get() .then((snapshot) => { const data = snapshot.val(); - setLoading(false); setUser(data); }) .catch((error) => { - setLoading(false); }); - } else { - setLoading(false); - } + } + setLoading(false); }); }, []); diff --git a/package-lock.json b/package-lock.json index 713c69a..03beb79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4573,6 +4573,15 @@ "@types/xdate": "*" } }, + "@types/react-native-snap-carousel": { + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/@types/react-native-snap-carousel/-/react-native-snap-carousel-3.8.4.tgz", + "integrity": "sha512-gBcMQyb7WztctzjAgr7RFzM5/59FDhcrsc7S2KibQbKyghzRE5dTJ61HfETmjgeIsJw/Ahgw3iKR1QSzpRwDvg==", + "requires": { + "@types/react": "*", + "@types/react-native": "*" + } + }, "@types/react-native-vector-icons": { "version": "6.4.6", "resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.6.tgz", diff --git a/screens/TabOneScreen.tsx b/screens/TabOneScreen.tsx index eecc9ab..5a9419b 100644 --- a/screens/TabOneScreen.tsx +++ b/screens/TabOneScreen.tsx @@ -13,6 +13,7 @@ import { } from "react-native"; import { Card, ListItem, Button, Icon } from "react-native-elements"; import RNPoll, { IChoice } from "react-native-poll"; +import _ from 'lodash'; import Search from "../components/Search"; import PersonalityModalScreen from "./PersonalityModalScreen"; import AngelScreen from "./AngelScreen"; @@ -159,7 +160,7 @@ const Post = ({ title, imageUrl, username, caption, likes, url }) => ( - {url} + {url} ); @@ -277,7 +278,6 @@ export default class TabOneScreen extends React.Component { @@ -286,7 +286,6 @@ export default class TabOneScreen extends React.Component { From a546bed2b5718f5baeb2878cb80c69c04a89d2c8 Mon Sep 17 00:00:00 2001 From: Aerin Date: Mon, 12 Jul 2021 21:10:13 +0800 Subject: [PATCH 2/2] fix css borderColor and border --- screens/BabyGame.tsx | 2 +- screens/FinalResult.tsx | 2 +- screens/TabThreeScreen.tsx | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/screens/BabyGame.tsx b/screens/BabyGame.tsx index f57f7f6..015c389 100644 --- a/screens/BabyGame.tsx +++ b/screens/BabyGame.tsx @@ -139,7 +139,7 @@ const styles = StyleSheet.create({ padding: 4, borderRadius: 6, textAlign: "center", - borderColor: "c4c3f7", + borderColor: "#c4c3f7", borderWidth: 2, height: 175, width: '100%', diff --git a/screens/FinalResult.tsx b/screens/FinalResult.tsx index 148e600..742fc5d 100644 --- a/screens/FinalResult.tsx +++ b/screens/FinalResult.tsx @@ -119,7 +119,7 @@ const styles = StyleSheet.create({ padding:8, borderRadius: 6, textAlign: "center", - borderColor: "c4c3f7", + borderColor: "#c4c3f7", borderWidth: 2, height: 95, width: '90%', diff --git a/screens/TabThreeScreen.tsx b/screens/TabThreeScreen.tsx index 0507c0a..cf57776 100644 --- a/screens/TabThreeScreen.tsx +++ b/screens/TabThreeScreen.tsx @@ -168,7 +168,9 @@ const styles = StyleSheet.create({ width: "85%", justifyContent: "center", alignItems: "center", - border: "solid lightgrey 0.5px", + borderColor: "lightgrey", + borderStyle: "solid", + borderWidth: 1, backgroundColor: "#FFF", marginVertical: 10, shadowColor: "#6c69eb",