Skip to content

Commit 0e9e705

Browse files
authored
fix android onboarding dev crash (#9132)
1 parent 12e09a9 commit 0e9e705

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/screens/Onboarding/Layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useState} from 'react'
22
import {ScrollView, View} from 'react-native'
3+
import {Dimensions} from 'react-native'
34
import {useSafeAreaInsets} from 'react-native-safe-area-context'
45
import {msg} from '@lingui/macro'
56
import {useLingui} from '@lingui/react'
@@ -77,10 +78,10 @@ export function Layout({children}: React.PropsWithChildren<{}>) {
7778
a.absolute,
7879
a.z_10,
7980
{
80-
left: '50%',
81+
left: isWeb ? '50%' : Dimensions.get('window').width / 2 - 45,
8182
top: insets.top + 2,
82-
transform: [{translateX: '-50%'}],
8383
},
84+
web({transform: [{translateX: '-50%'}]}),
8485
]}>
8586
<ButtonText>[DEV] Clear</ButtonText>
8687
</Button>

0 commit comments

Comments
 (0)