forked from tanner/qotnews
Add a button to toggle between article and comments
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { sourceLink, infoLine } from './utils.js';
|
||||
import { sourceLink, infoLine, ToggleDot } from './utils.js';
|
||||
|
||||
const apiUrl = 'http://news-api.dns.t0.vc/';
|
||||
|
||||
@@ -33,6 +33,7 @@ class Article extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const id = this.props.match.params.id;
|
||||
const story = this.state.story;
|
||||
const error = this.state.error;
|
||||
|
||||
@@ -61,6 +62,7 @@ class Article extends React.Component {
|
||||
:
|
||||
<p>loading...</p>
|
||||
}
|
||||
<ToggleDot id={id} />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user