From 91e1c39bbd0e0531c892b9d84142b2ef35bc40cd Mon Sep 17 00:00:00 2001 From: Joni Laukka <joni.laukka.overflow@gmail.com> Date: Thu, 20 Jun 2019 13:09:48 +0300 Subject: [PATCH] New game form now closes when the game is submitted --- src/components/NewGameForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/NewGameForm.js b/src/components/NewGameForm.js index 9d53959..3dcf6a5 100644 --- a/src/components/NewGameForm.js +++ b/src/components/NewGameForm.js @@ -91,7 +91,9 @@ export class NewGameForm extends React.Component{ }, body: JSON.stringify(gameObject) }).then(res => res.json()) - .then(result => console.log(result)) + .then(result => { + this.handleView(); + }) .catch(error => console.log('Error: ', error)); }; -- GitLab