feat: artist illustrations

This commit is contained in:
GitBluub
2023-05-30 02:34:05 +09:00
committed by Clément Le Bihan
parent 7f51582043
commit 3553954afd
29 changed files with 20 additions and 19 deletions
+12 -14
View File
@@ -1,26 +1,24 @@
import React from "react";
import Card, { CardBorderRadius } from './Card';
import { VStack, Text, Image } from 'native-base';
import Card, { CardBorderRadius } from "./Card";
import { VStack, Text, Image } from "native-base";
import API from "../API";
type ArtistCardProps = {
image: string;
name: string;
id: number;
onPress: () => void;
}
};
const ArtistCard = (props: ArtistCardProps) => {
const { image, name, id } = props;
return (
<Card
shadow={3}
onPress={props.onPress}
>
<Card shadow={3} onPress={props.onPress}>
<VStack m={1.5} space={3}>
<Image
style={{ zIndex: 0, aspectRatio: 1, borderRadius: CardBorderRadius }}
source={{ uri: image }}
source={{ uri: API.getArtistIllustration(id) }}
alt={name}
/>
<VStack>
@@ -31,13 +29,13 @@ const ArtistCard = (props: ArtistCardProps) => {
</VStack>
</Card>
);
}
};
ArtistCard.defaultProps = {
image: 'https://picsum.photos/200',
name: 'Artist',
image: "https://picsum.photos/200",
name: "Artist",
id: 0,
onPress: () => { }
}
onPress: () => { },
};
export default ArtistCard;
export default ArtistCard;