From 54ccb41443cab9f8446f4099c7371b67746dcff8 Mon Sep 17 00:00:00 2001 From: natjms Date: Fri, 9 Jul 2021 20:06:03 -0300 Subject: [PATCH] Improve the look of Publish --- src/components/pages/publish.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/pages/publish.js b/src/components/pages/publish.js index 26e0fdd..b454124 100644 --- a/src/components/pages/publish.js +++ b/src/components/pages/publish.js @@ -55,7 +55,6 @@ const PublishJsx = ({ navigation }) => { }) .then(({ uri, type, width, height }) => { const name = uri.split("/").slice(-1)[0]; - const newWidth = SCREEN_WIDTH * (3/4); setState({...state, loaded: true, @@ -68,8 +67,8 @@ const PublishJsx = ({ navigation }) => { type: mime.getType(uri), name, }, - width: newWidth, - height: getAutoHeight(width, height, newWidth), + width: SCREEN_WIDTH, + height: getAutoHeight(width, height, SCREEN_WIDTH), }, }); }); @@ -143,9 +142,10 @@ const PublishJsx = ({ navigation }) => { setState({ ...state, caption }) } @@ -155,17 +155,17 @@ const PublishJsx = ({ navigation }) => { { }; const SCREEN_WIDTH = Dimensions.get("window").width; +const SCREEN_HEIGHT = Dimensions.get("window").height; const styles = { preview: { container: { @@ -192,6 +193,7 @@ const styles = { image: { marginLeft: "auto", marginRight: "auto", + height: SCREEN_HEIGHT / 3, }, },