Front: Remove use of external images for placeholders

This commit is contained in:
Arthur Jamet
2023-12-19 11:48:47 +01:00
committed by Clément Le Bihan
parent fb0e43af88
commit e90c7f05a8
4 changed files with 5 additions and 17 deletions
+2 -8
View File
@@ -3,7 +3,7 @@ import Card, { CardBorderRadius } from './Card';
import { VStack, Text, Image } from 'native-base';
type ArtistCardProps = {
image: string;
image?: string;
name: string;
id: number;
onPress: () => void;
@@ -18,6 +18,7 @@ const ArtistCard = (props: ArtistCardProps) => {
<Image
style={{ zIndex: 0, aspectRatio: 1, borderRadius: CardBorderRadius }}
source={{ uri: image }}
fallbackSource={{ uri: require('../assets/icon.jpg') }}
alt={name}
/>
<VStack>
@@ -30,11 +31,4 @@ const ArtistCard = (props: ArtistCardProps) => {
);
};
ArtistCard.defaultProps = {
image: 'https://picsum.photos/200',
name: 'Artist',
id: 0,
onPress: () => {},
};
export default ArtistCard;
+1 -6
View File
@@ -30,6 +30,7 @@ const GenreCard = (props: GenreCardProps) => {
source={{
uri: image,
}}
fallbackSource={{ uri: require('../assets/icon.jpg') }}
size="md"
/>
</Box>
@@ -43,10 +44,4 @@ const GenreCard = (props: GenreCardProps) => {
);
};
GenreCard.defaultProps = {
icon: 'https://picsum.photos/200',
name: 'Genre',
onPress: () => {},
};
export default GenreCard;
+1 -1
View File
@@ -29,7 +29,7 @@ const swaToSongCardProps = (song: Song) => ({
songId: song.id,
name: song.name,
artistName: song.artist!.name,
cover: song.cover ?? 'https://picsum.photos/200',
cover: song.cover
});
const HomeSearchComponent = () => {