Add a button to toggle between article and comments

This commit is contained in:
2019-08-25 08:50:49 +00:00
parent 9336760ed3
commit b1275d9a27
6 changed files with 125 additions and 5 deletions

View File

@@ -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>