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