From 9b0be8f25ec49595f3e6040657aed911b337a635 Mon Sep 17 00:00:00 2001 From: rohitsharma120582 <86062128+rohitsharma120582@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:41:41 +0530 Subject: [PATCH] fix the issue related to incompatible value as a key in StyleSheet.create by replacing it with simple javascript object (#709) --- packages/camera/src/components/Layout/index.js | 6 +++--- packages/camera/src/components/Layout/index.native.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/camera/src/components/Layout/index.js b/packages/camera/src/components/Layout/index.js index 87c959f29..4e01f2684 100644 --- a/packages/camera/src/components/Layout/index.js +++ b/packages/camera/src/components/Layout/index.js @@ -87,10 +87,10 @@ function Layout({ backgroundColor, children, left, right, isPortrait, selectedMo const { height, width } = useWindowDimensions(); const { t } = useTranslation(); - const size = StyleSheet.create({ - height: isPortrait ? width : height, + const size = { width: isPortrait ? height : width, - }); + height: isPortrait ? width : height, + }; const containerStyle = StyleSheet.compose( styles.container, diff --git a/packages/camera/src/components/Layout/index.native.js b/packages/camera/src/components/Layout/index.native.js index 888b98c38..9116462f4 100644 --- a/packages/camera/src/components/Layout/index.native.js +++ b/packages/camera/src/components/Layout/index.native.js @@ -30,7 +30,7 @@ const styles = StyleSheet.create({ function Layout({ backgroundColor, children, isReady, left, right }) { const { height, width } = useWindowDimensions(); - const size = StyleSheet.create({ height, width }); + const size = { width, height }; const leftStyle = StyleSheet.compose( [size, styles.section, styles.side, { width: SIDE }],