updated react native svg

This commit is contained in:
Clément Le Bihan
2023-11-27 17:54:49 +01:00
parent 92169bf485
commit e8e6012bf2
4 changed files with 9 additions and 8 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ export type ParitionMagicProps = {
}; };
const getSVGURL = (songID: number) => { const getSVGURL = (songID: number) => {
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.3.0/flags/1x1/ad.svg'; // return 'https://www.svgrepo.com/show/148626/test.svg';
// return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.3.0/flags/1x1/ad.svg';
return API.getPartitionSvgUrl(songID); return API.getPartitionSvgUrl(songID);
}; };
+2 -2
View File
@@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import { ViewStyle, ImageBackground, Platform, Image } from 'react-native'; import { ViewStyle, ImageBackground, Platform, Image } from 'react-native';
import { SvgCssUri } from 'react-native-svg'; import { SvgCssUri } from 'react-native-svg/css';
import Svg, { Path, Text, G } from 'react-native-svg';
type SvgContainerProps = { type SvgContainerProps = {
url: string; url: string;
@@ -21,7 +22,6 @@ export const GetSvgDims = (url: string, success: (w: number, h: number) => void)
}; };
export const SvgContainer = ({ url, onReady, style }: SvgContainerProps) => { export const SvgContainer = ({ url, onReady, style }: SvgContainerProps) => {
// const [dims, setDims] = React.useState<[number, number]>([470.1052279999999, 0]);
if (Platform.OS === 'web') { if (Platform.OS === 'web') {
return ( return (
+1 -1
View File
@@ -49,7 +49,7 @@
"react-native-safe-area-context": "4.6.3", "react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0", "react-native-screens": "~3.22.0",
"react-native-super-grid": "^5.0.0", "react-native-super-grid": "^5.0.0",
"react-native-svg": "13.9.0", "react-native-svg": "14.0.0",
"react-native-tab-view": "^3.5.2", "react-native-tab-view": "^3.5.2",
"react-native-url-polyfill": "^2.0.0", "react-native-url-polyfill": "^2.0.0",
"react-native-web": "~0.19.6", "react-native-web": "~0.19.6",
+4 -4
View File
@@ -9919,10 +9919,10 @@ react-native-super-grid@^5.0.0:
dependencies: dependencies:
prop-types "^15.6.0" prop-types "^15.6.0"
react-native-svg@13.9.0: react-native-svg@14.0.0:
version "13.9.0" version "14.0.0"
resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-13.9.0.tgz#8df8a690dd00362601f074dec5d3a86dd0f99c7f" resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-14.0.0.tgz#ea1974dec9a91a09c6a38b7bf58d85e857c291f5"
integrity sha512-Ey18POH0dA0ob/QiwCBVrxIiwflhYuw0P0hBlOHeY4J5cdbs8ngdKHeWC/Kt9+ryP6fNoEQ1PUgPYw2Bs/rp5Q== integrity sha512-17W/gWXRUMS7p7PSHu/WyGkZUc1NzRTGxxXc0VqBLjzKSchyb0EmgsiWf9aKmfC6gmY0wcsmKZcGV41bCcNfBA==
dependencies: dependencies:
css-select "^5.1.0" css-select "^5.1.0"
css-tree "^1.1.3" css-tree "^1.1.3"