Front: Pretty and Lint (#225)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React from "react";
|
||||
import Card, { CardBorderRadius } from "./Card";
|
||||
import { VStack, Text, Image } from "native-base";
|
||||
import { useNavigation } from "../Navigation";
|
||||
import API from "../API";
|
||||
import React from 'react';
|
||||
import Card, { CardBorderRadius } from './Card';
|
||||
import { VStack, Text, Image } from 'native-base';
|
||||
import { useNavigation } from '../Navigation';
|
||||
type SongCardProps = {
|
||||
cover: string;
|
||||
name: string;
|
||||
@@ -14,12 +13,12 @@ const SongCard = (props: SongCardProps) => {
|
||||
const { cover, name, artistName, songId } = props;
|
||||
const navigation = useNavigation();
|
||||
return (
|
||||
<Card shadow={3} onPress={() => navigation.navigate("Song", { songId })}>
|
||||
<Card shadow={3} onPress={() => navigation.navigate('Song', { songId })}>
|
||||
<VStack m={1.5} space={3}>
|
||||
<Image
|
||||
style={{ zIndex: 0, aspectRatio: 1, borderRadius: CardBorderRadius }}
|
||||
source={{ uri: cover }}
|
||||
alt={[props.name, props.artistName].join("-")}
|
||||
alt={[props.name, props.artistName].join('-')}
|
||||
/>
|
||||
<VStack>
|
||||
<Text isTruncated bold fontSize="md" noOfLines={2} height={50}>
|
||||
|
||||
Reference in New Issue
Block a user