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, }, },