Skip to content
Snippets Groups Projects
Commit 8044b0a4 authored by Joni Laukka's avatar Joni Laukka
Browse files

Edit game button does not show up if user is not logged in.

parent 1a75bd85
No related branches found
No related tags found
3 merge requests!21Development,!15Get game creation to user-marker-database-interactions,!13Resolve "Pelinluontilomake"
...@@ -67,7 +67,8 @@ class GameList extends React.Component { ...@@ -67,7 +67,8 @@ class GameList extends React.Component {
<select onChange={this.handleChange}> <select onChange={this.handleChange}>
{items} {items}
</select> </select>
<button onClick={this.handleEditClick}>Edit game</button> {sessionStorage.getItem('token')
&& <button onClick={this.handleEditClick}>Edit game</button>}
{(this.state.editForm && this.state.selectedGame !== null) {(this.state.editForm && this.state.selectedGame !== null)
&& <EditGameForm gameId={this.state.selectedGame} toggleView={this.toggleView}/>} && <EditGameForm gameId={this.state.selectedGame} toggleView={this.toggleView}/>}
</Fragment> </Fragment>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment