gamenight-participants #4

Closed
Roflin wants to merge 7 commits from gamenight-participants into game-adding-to-gamenight
3 changed files with 3 additions and 5 deletions
Showing only changes of commit 9de8ffaa2d - Show all commits

View File

@ -100,9 +100,6 @@ function App() {
setUser(JSON.parse(localStorage.getItem(localStorageUserKey)));
}, []);
console.log(activeGamenight);
if(user === null) {
return (
<div className="App">

View File

@ -1,7 +1,6 @@
import * as React from 'react';
function Gamenight(props) {
console.log(props.gamenight);
let games = props.gamenight.game_list.map(g =>
(

View File

@ -36,7 +36,9 @@ function Gamenights(props) {
<li onClick={(e) => props.onSelectGamenight(g)}>
<span>{g.name}</span>
{(props.user.id === g.owner_id || props.user.role === "Admin") &&
<button onClick={() =>DeleteGameNight(g.id, g.owner)}>x</button>
<button onClick={(e) => {
e.stopPropagation();
DeleteGameNight(g.id, g.owner)}}>x</button>
}
</li>
)