Client: fix

This commit is contained in:
Sam 2018-05-29 22:19:17 +02:00
parent 0c6c588e74
commit b07b20c5e8
2 changed files with 7 additions and 5 deletions

View File

@ -13,10 +13,10 @@ export default function ActivityCardHeader(props) {
<div className="container"> <div className="container">
<div className="row"> <div className="row">
<div className="col-auto"> <div className="col-auto">
{activity.previous_activity ? ( {activity.next_activity ? (
<Link <Link
className="unlink" className="unlink"
to={`/activities/${activity.previous_activity}`} to={`/activities/${activity.next_activity}`}
> >
<i <i
className="fa fa-chevron-left" className="fa fa-chevron-left"
@ -60,10 +60,10 @@ export default function ActivityCardHeader(props) {
)} )}
</div> </div>
<div className="col-auto"> <div className="col-auto">
{activity.next_activity ? ( {activity.previous_activity ? (
<Link <Link
className="unlink" className="unlink"
to={`/activities/${activity.next_activity}`} to={`/activities/${activity.previous_activity}`}
> >
<i <i
className="fa fa-chevron-right" className="fa fa-chevron-right"

View File

@ -38,7 +38,9 @@ export const createRequest = params => {
} }
const request = new Request(params.url, requestParams) const request = new Request(params.url, requestParams)
return fetch(request) return fetch(request)
.then(response => response.json()) .then(response => params.method === 'DELETE'
? response
: response.json())
.catch(error => error) .catch(error => error)
} }