{"size": 1180, "ext": "js", "max_stars_repo_path": "src/components/Album/AlbumComponent.js", "max_stars_repo_name": "Angmenghout/Sound-Lock", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Album/AlbumComponent.js", "max_issues_repo_name": "Angmenghout/Sound-Lock", "max_issues_repo_issues_event_min_datetime": "2021-03-10T06:37:19.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T23:15:08.000Z", "max_forks_repo_path": "src/components/Album/AlbumComponent.js", "max_forks_repo_name": "Angmenghout/Sound-Lock", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 25.652173913, "max_line_length": 64, "alphanum_fraction": 0.5618644068}
import React from "react"
import PropType from "prop-types"
import Card from "antd/es/card"
import Avatar from "antd/es/avatar"
import {Link} from "react-router-dom"
import TrackPlayerComponent from "../Player/TrackPlayer"
import Typography from "antd/es/typography"
import { formatCountdown } from "antd/lib/statistic/utils"

const { Meta } = Card
const { Title, Text } = Typography

const AlbumComponent = props => {
    const { album } = props

    if( album === undefined ) {
        return <></>
    }

    return (
        <Card
            style={{marginTop: '10px'}}
            cover={
                // Use for make avatar image to center
        <Link to="/album-detail/1">
            <img
                style={{ width: '100%' }}
                src={album.imageUrl}
                />
        </Link>
            }
        >
            <Meta
                title={<Text level={6} children={album.name} />}
                description={`${album.total_songs} songs`}
            />
        </Card>
    )
}

// Prop type use to make IDE recognize what accept api
// from component
AlbumComponent.propTypes = {
    album: PropType.any
}
export default AlbumComponent