You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
826 B
33 lines
826 B
import React, { useState } from 'react';
|
|
|
|
/* Component */
|
|
import GraphContainer from '../Components/GraphContainer';
|
|
import ChoiceBar from '../Components/ChoiceBar';
|
|
import ButtonImgNav from '../Components/ButtonImgNav';
|
|
|
|
/* Icon */
|
|
import Leave from "../res/icon/leave.png";
|
|
|
|
const InGame = () => {
|
|
const [showChoiceBar, setShowChoiceBar] = useState(false);
|
|
|
|
const handleNodeClick = (shouldShowChoiceBar: boolean) => {
|
|
setShowChoiceBar(shouldShowChoiceBar);
|
|
};
|
|
|
|
return (
|
|
<div>
|
|
<GraphContainer onNodeClick={handleNodeClick} />
|
|
<div id="bottom-container">
|
|
{showChoiceBar && <ChoiceBar />}
|
|
</div>
|
|
<div> {/* tmp */}
|
|
<ButtonImgNav dest="/endgame" img={Leave} text='endgame'/>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
|
|
export default InGame;
|