Skip to content

Commit 1dc1be6

Browse files
author
uguratar
committed
Adds youtube and simplecast links in total listens tab #22
1 parent 5832cf6 commit 1dc1be6

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ yarn-debug.log*
2121
yarn-error.log*
2222

2323
/.vscode
24+
/.vscode/launch.json

src/components/TopBottomNEpisodes.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class TopBottomNEpisodes extends Component {
7878
glyph={this.state.up ? 'chevron-up' : 'chevron-down'}
7979
/>
8080
</th>
81+
<th colSpan="2">Dinle</th>
8182
</tr>
8283
</thead>
8384
<tbody>
@@ -95,15 +96,23 @@ export class TopBottomNEpisodes extends Component {
9596
return (
9697
<tr key={episode.id}>
9798
<td>
98-
<a href={episode.audio_url}>{episode.title}</a>
99+
{episode.title}
99100
</td>
100101
<td>{episode.stats.total_listens}</td>
101102
<td>
102103
{episode.videoRef
103104
? episode.videoRef.statistics.viewCount
104-
: 'N/A'}
105+
: 'N/A'}
105106
</td>
106107
<td>{episode.grandTotal}</td>
108+
<td> <a href={episode.sharing_url} target="_blank" rel="noopener noreferrer" title="Simplecast'de dinle">
109+
<Glyphicon glyph="play-circle"/>
110+
</a>
111+
</td>
112+
<td>
113+
<a href={"https://www.youtube.com/watch?v="+ episode.videoRef.snippet.resourceId.videoId}
114+
title="Youtube'da izle" target="_blank" rel="noopener noreferrer">
115+
<Glyphicon glyph="play-circle"/></a></td>
107116
</tr>
108117
);
109118
})}

src/queries/dashboard.query.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const DashboardQuery = gql`
1111
title
1212
id
1313
audio_url
14+
sharing_url
15+
guid
1416
stats(timeframe: all) {
1517
data {
1618
date
@@ -27,6 +29,9 @@ export const DashboardQuery = gql`
2729
videos {
2830
snippet {
2931
title
32+
resourceId {
33+
videoId
34+
}
3035
}
3136
statistics {
3237
viewCount

0 commit comments

Comments
 (0)