Some Cleaup.
This commit is contained in:
parent
102a3e6082
commit
9de8ffaa2d
@ -100,9 +100,6 @@ function App() {
|
|||||||
setUser(JSON.parse(localStorage.getItem(localStorageUserKey)));
|
setUser(JSON.parse(localStorage.getItem(localStorageUserKey)));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
console.log(activeGamenight);
|
|
||||||
|
|
||||||
if(user === null) {
|
if(user === null) {
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
function Gamenight(props) {
|
function Gamenight(props) {
|
||||||
console.log(props.gamenight);
|
|
||||||
|
|
||||||
let games = props.gamenight.game_list.map(g =>
|
let games = props.gamenight.game_list.map(g =>
|
||||||
(
|
(
|
||||||
|
@ -36,7 +36,9 @@ function Gamenights(props) {
|
|||||||
<li onClick={(e) => props.onSelectGamenight(g)}>
|
<li onClick={(e) => props.onSelectGamenight(g)}>
|
||||||
<span>{g.name}</span>
|
<span>{g.name}</span>
|
||||||
{(props.user.id === g.owner_id || props.user.role === "Admin") &&
|
{(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>
|
</li>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user