Skip to content

Commit

Permalink
fix the issue related to incompatible value as a key in StyleSheet.cr…
Browse files Browse the repository at this point in the history
…eate by replacing it with simple javascript object (#709)
  • Loading branch information
rohitsharma120582 authored Mar 26, 2024
1 parent e836b64 commit 9b0be8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/camera/src/components/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/src/components/Layout/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
Expand Down

0 comments on commit 9b0be8f

Please sign in to comment.