Some Cleaup.

This commit is contained in:
Dennis Brentjes 2022-05-29 10:46:05 +02:00
parent 102a3e6082
commit 9de8ffaa2d
3 changed files with 3 additions and 5 deletions

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>
)