diff --git a/src/components/metadata/RatingsSection.tsx b/src/components/metadata/RatingsSection.tsx index 92b5e3b3..3bfefba9 100644 --- a/src/components/metadata/RatingsSection.tsx +++ b/src/components/metadata/RatingsSection.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState, useRef, useCallback, useMemo } from 'react'; +import { SvgUri } from 'react-native-svg'; import { View, Text, StyleSheet, ActivityIndicator, Image, Animated, Dimensions } from 'react-native'; import { MaterialIcons as MaterialIconsWrapper } from '@expo/vector-icons'; import { useTheme } from '../../contexts/ThemeContext'; @@ -22,7 +23,7 @@ const BREAKPOINTS = { tv: 1440, }; -const IMDb_LOGO = 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/IMDB_Logo_2016.svg/575px-IMDB_Logo_2016.svg.png'; +const IMDb_LOGO = 'https://upload.wikimedia.org/wikipedia/commons/6/69/IMDB_Logo_2016.svg'; export const RATING_PROVIDERS = { imdb: { @@ -162,8 +163,8 @@ export const RatingsSection: React.FC = ({ imdbId, type }) const ratingConfig = { imdb: { name: 'IMDb', - icon: { uri: IMDb_LOGO }, - isImage: true, + icon: IMDb_LOGO, + isRemoteSvg: true, color: '#F5C518', transform: (value: number) => value.toFixed(1) }, @@ -244,10 +245,24 @@ export const RatingsSection: React.FC = ({ imdbId, type }) return ( - {config.isImage ? ( + {config.isRemoteSvg ? ( + + ) : config.isImage ? ( ) : config.icon ? ( @@ -258,13 +273,14 @@ export const RatingsSection: React.FC = ({ imdbId, type }) })} ) : ( - // Text fallback - + {config.name} )} @@ -311,4 +327,4 @@ const styles = StyleSheet.create({ fontSize: 14, fontWeight: '600', }, -}); \ No newline at end of file +});