Skip to content

Commit b199c41

Browse files
committed
remove unused variable and imports
1 parent 07a2b8d commit b199c41

File tree

1 file changed

+38
-42
lines changed

1 file changed

+38
-42
lines changed

src/components/showcase/Card.js

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ import cn from 'classnames';
44

55
import Image from '../Image';
66

7-
import { getReadableDate } from '../../hooks';
8-
97
import * as css from './Card.module.css';
108

11-
import PlayButton from '../../images/playbutton.svg';
12-
139
const ExternalLink = ({ children, href, className = '' }) => {
1410
return (
1511
<a
@@ -23,7 +19,7 @@ const ExternalLink = ({ children, href, className = '' }) => {
2319
};
2420

2521
const Card = ({ className, contribution, placeholderImage }) => {
26-
const { title, url, submittedOn, cover, author, video } = contribution;
22+
const { title, url, cover, author, video } = contribution;
2723

2824
const slug = video.canonicalTrack
2925
? `/tracks/${video.canonicalTrack.slug}/${video.slug}`
@@ -39,45 +35,45 @@ const Card = ({ className, contribution, placeholderImage }) => {
3935
</h3>
4036
</div>
4137
<div className={css.thumb}>
42-
<ExternalLink href={url}>
43-
{cover ? (
44-
<Image
45-
image={cover.file.childImageSharp.gatsbyImageData}
46-
pictureClassName={css.picture}
47-
imgClassName={css.image}
48-
alt={title}
49-
/>
50-
) : placeholderImage ? (
51-
<Image
52-
image={placeholderImage}
53-
pictureClassName={css.picture}
54-
imgClassName={css.image}
55-
alt={title}
56-
/>
57-
) : (
58-
<div
59-
aria-label={title}
60-
className={css.image}
61-
style={{ width: '100%', height: '100%' }}
62-
/>
63-
)}
64-
</ExternalLink>
38+
<ExternalLink href={url}>
39+
{cover ? (
40+
<Image
41+
image={cover.file.childImageSharp.gatsbyImageData}
42+
pictureClassName={css.picture}
43+
imgClassName={css.image}
44+
alt={title}
45+
/>
46+
) : placeholderImage ? (
47+
<Image
48+
image={placeholderImage}
49+
pictureClassName={css.picture}
50+
imgClassName={css.image}
51+
alt={title}
52+
/>
53+
) : (
54+
<div
55+
aria-label={title}
56+
className={css.image}
57+
style={{ width: '100%', height: '100%' }}
58+
/>
59+
)}
60+
</ExternalLink>
6561
</div>
6662
<div className={css.info}>
67-
<p>
68-
by{' '}
69-
{author.url ? (
70-
<ExternalLink href={author.url} className={css.authorLink}>
71-
{author.name}
72-
</ExternalLink>
73-
) : (
74-
author.name
75-
)}{' '}
76-
From{' '}
77-
<Link to={slug} className={css.videoLink}>
78-
{video.title}
79-
</Link>{' '}
80-
</p>
63+
<p>
64+
by{' '}
65+
{author.url ? (
66+
<ExternalLink href={author.url} className={css.authorLink}>
67+
{author.name}
68+
</ExternalLink>
69+
) : (
70+
author.name
71+
)}{' '}
72+
From{' '}
73+
<Link to={slug} className={css.videoLink}>
74+
{video.title}
75+
</Link>{' '}
76+
</p>
8177
</div>
8278
</article>
8379
);

0 commit comments

Comments
 (0)