import { GameInfo } from "@/service/game-database"; import { FormattedMessage } from "react-intl"; import { IconButton } from "../buttons"; import GameInfoCard from "../game-info"; import { SearchCategory } from "./category-search"; import { StreamInput } from "./input"; import { TagsInput } from "react-tag-input-component"; export default function CategoryInput({ tags, game, gameId, setTags, setGame, setGameId, }: { tags: Array; game: GameInfo | undefined; gameId: string | undefined; setTags: (v: Array) => void; setGame: (g: GameInfo | undefined) => void; setGameId: (id: string | undefined) => void; }) { return ( <> }> {!gameId && ( { setGame(g); setGameId(g.id); }} /> )} {gameId && (
{ setGame(undefined); setGameId(undefined); }} />
)}
}> ); }