Allow non master to add available items
This commit is contained in:
parent
8c48a816f0
commit
98be82d3b7
1 changed files with 1 additions and 4 deletions
|
@ -3,8 +3,6 @@ import { useRecoilValue } from "recoil";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
import { useC2C } from "../hooks/useC2C";
|
|
||||||
|
|
||||||
import AvailableItems from "./AvailableItems";
|
import AvailableItems from "./AvailableItems";
|
||||||
import { useItems } from "../components/Board/Items";
|
import { useItems } from "../components/Board/Items";
|
||||||
import NewItems from "./NewItems";
|
import NewItems from "./NewItems";
|
||||||
|
@ -35,7 +33,6 @@ const Title = styled.h3``;
|
||||||
|
|
||||||
export const GameController = () => {
|
export const GameController = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [, , isMaster] = useC2C();
|
|
||||||
const { itemList } = useItems();
|
const { itemList } = useItems();
|
||||||
|
|
||||||
const availableItemList = useRecoilValue(AvailableItemListAtom);
|
const availableItemList = useRecoilValue(AvailableItemListAtom);
|
||||||
|
@ -45,7 +42,7 @@ export const GameController = () => {
|
||||||
console.log(itemList);
|
console.log(itemList);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isMaster || Object.keys(boardConfig).length === 0) {
|
if (Object.keys(boardConfig).length === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue