From 8311e841b9bdf4350b59a8010525e47aaa3aaa13 Mon Sep 17 00:00:00 2001 From: 0hee0 Date: Mon, 15 Aug 2022 15:06:20 +0900 Subject: [PATCH] [#11] style: implement responsive UI --- react-native/components/BottomDrawer.tsx | 46 ++++++++++++------------ react-native/screens/TranslateScreen.tsx | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/react-native/components/BottomDrawer.tsx b/react-native/components/BottomDrawer.tsx index b94f819..fbdd665 100644 --- a/react-native/components/BottomDrawer.tsx +++ b/react-native/components/BottomDrawer.tsx @@ -149,23 +149,23 @@ function BottomDrawer(props: BottomDrawerProps) { return ( - - - - {props.showKorean ? i18n.t('korean') : i18n.t('translation')} - - - - - - - - - - - {/* */} - - + + + + {props.showKorean ? i18n.t('korean') : i18n.t('translation')} + + + + + + + + + + + {/* */} + + {!props.showKorean ? ( props.results?.fullText?.map((item, index) => @@ -309,10 +309,10 @@ function BottomDrawer(props: BottomDrawerProps) { {props.results?.korean} )} - - - {/* */} - + + + {/* */} + {props.isTranslateScreen && @@ -403,9 +403,9 @@ const styles = StyleSheet.create({ backgroundColor: theme.colors.gray }, regularButton: { + marginTop: 20, paddingVertical: 16, flex: 0.9, - marginTop: 16, alignItems: 'center', borderRadius: 16 }, @@ -430,7 +430,7 @@ const styles = StyleSheet.create({ backgroundColor: theme.colors.primary, }, full: { - paddingBottom: 96 + paddingBottom: Dimensions.get('window').height / Dimensions.get('window').width > 2 ? 96: 40 }, dropdown: { height: 32, diff --git a/react-native/screens/TranslateScreen.tsx b/react-native/screens/TranslateScreen.tsx index 22d4716..28e75db 100644 --- a/react-native/screens/TranslateScreen.tsx +++ b/react-native/screens/TranslateScreen.tsx @@ -90,7 +90,7 @@ export default function TranslateScreen({ navigation }: Navigation) { console.log("ocr", formdata); - // setLoading(true); + setLoading(true); if (auth?.authData?.access_token) { const axiosInstance = axios.create({