diff --git a/src/components/CharacterGrid/index.tsx b/src/components/CharacterGrid/index.tsx index 665df305..cb2d3eb3 100644 --- a/src/components/CharacterGrid/index.tsx +++ b/src/components/CharacterGrid/index.tsx @@ -11,6 +11,8 @@ export enum GridType { } interface Props { + userId?: string + grid: GridArray editable: boolean exists: boolean onSelect: (type: GridType, character: Character, position: number) => void @@ -19,8 +21,9 @@ interface Props { const CharacterGrid = (props: Props) => { const numCharacters: number = 5 - const [characters, setCharacters] = useState>({}) - const [partyId, setPartyId] = useState('') + function receiveCharacter(character: Character, position: number) { + props.onSelect(GridType.Character, character, position) + } return (
@@ -31,9 +34,9 @@ const CharacterGrid = (props: Props) => {
  • {}} + onReceiveData={receiveCharacter} position={i} - character={characters[i]} + character={props.grid[i]} />
  • )