Add suspense boundary in onboarding (#5556)

This commit is contained in:
Eric Bailey
2024-10-02 10:55:06 -05:00
committed by GitHub
parent 3569873123
commit 1a7885b921
@@ -46,29 +46,31 @@ export const PlaceholderCanvas = React.forwardRef<PlaceholderCanvasRef, {}>(
return ( return (
<View style={styles.container}> <View style={styles.container}>
<LazyViewShot <React.Suspense fallback={null}>
// @ts-ignore this library doesn't have types <LazyViewShot
ref={viewshotRef} // @ts-ignore this library doesn't have types
options={{ ref={viewshotRef}
fileName: 'placeholderAvatar', options={{
format: 'jpg', fileName: 'placeholderAvatar',
quality: 0.8, format: 'jpg',
height: 150 * SIZE_MULTIPLIER, quality: 0.8,
width: 150 * SIZE_MULTIPLIER, height: 150 * SIZE_MULTIPLIER,
}}> width: 150 * SIZE_MULTIPLIER,
<View }}>
style={[ <View
styles.imageContainer, style={[
{backgroundColor: avatar.backgroundColor}, styles.imageContainer,
]} {backgroundColor: avatar.backgroundColor},
collapsable={false}> ]}
<Icon collapsable={false}>
height={85 * SIZE_MULTIPLIER} <Icon
width={85 * SIZE_MULTIPLIER} height={85 * SIZE_MULTIPLIER}
style={{color: 'white'}} width={85 * SIZE_MULTIPLIER}
/> style={{color: 'white'}}
</View> />
</LazyViewShot> </View>
</LazyViewShot>
</React.Suspense>
</View> </View>
) )
}, },