import { useState, useContext } from "react"; import AppContext from "../context/app"; import Player from "./player"; const ShowDoorDialog = () => { const { loading, openDoor, openSong, openSongIndex } = useContext(AppContext); const [showSolution, setShowSolution] = useState(false); const [showHint, setShowHint] = useState(false); const handleClose = () => { openDoor(null); setShowSolution(false); }; if (loading || !openSong) { return null; } const { title, hint, id } = openSong; return (
setShowHint(true)}> Ich brauche einen Tip!
)} {hint && showHint && ({hint}