Front: Remove use of external images for placeholders
This commit is contained in:
committed by
Clément Le Bihan
parent
fb0e43af88
commit
e90c7f05a8
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user