work on PlayView is almost done everything works fine the gameplay makes the mobile crash but it will be fixed later

This commit is contained in:
Clément Le Bihan
2023-11-28 00:00:05 +01:00
parent 36041369db
commit 4de420e4dc
4 changed files with 6 additions and 9 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { ViewStyle, ImageBackground, Platform } from 'react-native';
import { ViewStyle, Image, Platform, StyleProp, ImageStyle } from 'react-native';
import { SvgCssUri } from 'react-native-svg/css';
type SvgContainerProps = {
@@ -10,7 +10,9 @@ type SvgContainerProps = {
export const SvgContainer = ({ url, onReady, style }: SvgContainerProps) => {
if (Platform.OS === 'web') {
return <ImageBackground source={{ uri: url }} onLoad={onReady} style={style} />;
return (
<Image source={{ uri: url }} onLoad={onReady} style={style as StyleProp<ImageStyle>} />
);
}
return (
<SvgCssUri