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

View File

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