@@ -4,12 +4,8 @@ import cn from 'classnames';
4
4
5
5
import Image from '../Image' ;
6
6
7
- import { getReadableDate } from '../../hooks' ;
8
-
9
7
import * as css from './Card.module.css' ;
10
8
11
- import PlayButton from '../../images/playbutton.svg' ;
12
-
13
9
const ExternalLink = ( { children, href, className = '' } ) => {
14
10
return (
15
11
< a
@@ -23,7 +19,7 @@ const ExternalLink = ({ children, href, className = '' }) => {
23
19
} ;
24
20
25
21
const Card = ( { className, contribution, placeholderImage } ) => {
26
- const { title, url, submittedOn , cover, author, video } = contribution ;
22
+ const { title, url, cover, author, video } = contribution ;
27
23
28
24
const slug = video . canonicalTrack
29
25
? `/tracks/${ video . canonicalTrack . slug } /${ video . slug } `
@@ -39,45 +35,45 @@ const Card = ({ className, contribution, placeholderImage }) => {
39
35
</ h3 >
40
36
</ div >
41
37
< 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 >
65
61
</ div >
66
62
< 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 >
81
77
</ div >
82
78
</ article >
83
79
) ;
0 commit comments