refining component
This commit is contained in:
parent
7422e4ba23
commit
e3f309dd73
|
|
@ -6,15 +6,18 @@ import { useUser } from "../../hooks/useUser";
|
|||
import { postGameStatisticsData } from "../../services/WordpressFetchData";
|
||||
export default function ExtraControls() {
|
||||
const { language, country } = useUser();
|
||||
const { contextGameDatas, score, currentGameModal, setCurrentGameModal } = useGame();
|
||||
const { contextGameDatas, score, currentGameModal, setCurrentGameModal, buildGameStatsObject } = useGame();
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const correctAnswer = contextGameDatas?.gameObjects[0].attrs.behaviourType;
|
||||
const objectPictureUrl = contextGameDatas?.gameObjects[0].attrs.objectPictureUrl;
|
||||
|
||||
const datas = buildGameStatsObject();
|
||||
|
||||
function sendDatasTest() {
|
||||
postGameStatisticsData();
|
||||
// console.log(datas);
|
||||
postGameStatisticsData(datas);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user