refactoring test page
This commit is contained in:
parent
1a87fd49be
commit
fb5459dc42
|
|
@ -1,22 +1,27 @@
|
|||
import Menu from "../components/ui/Menu";
|
||||
import { postGameStatisticsData, postGameStatisticsDataBackend } from "../services/WordpressFetchData";
|
||||
import { postGameStatisticsData } from "../services/WordpressFetchData";
|
||||
import { useLanguage } from "../hooks/useLanguage";
|
||||
import { useEffect } from "react";
|
||||
export default function Test() {
|
||||
const { language } = useLanguage();
|
||||
|
||||
function postStatistics() {
|
||||
postGameStatisticsDataBackend();
|
||||
function testPost() {
|
||||
const requestDataExample = {
|
||||
user_locale: "DE",
|
||||
user_country: "France",
|
||||
level_post_id: 43,
|
||||
level_score: 1,
|
||||
level_completion_time: 800,
|
||||
};
|
||||
postGameStatisticsData(requestDataExample);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='page-container page-container--test'>
|
||||
{/* <button onClick={handleTest}>test de send umami</button> */}
|
||||
<div className='screen screen--test'>
|
||||
<Menu />
|
||||
<div id='screen-container'>
|
||||
<button onClick={postStatistics}> Test throught backend</button>
|
||||
{/* <button onClick={() => addPost()}>static data function Finish the game</button> */}
|
||||
<button onClick={testPost}>TEEEESt</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user