updating test page to use backend post
This commit is contained in:
parent
ff364f661e
commit
86a5d4da74
|
|
@ -1,13 +1,12 @@
|
|||
import Menu from "../components/ui/Menu";
|
||||
import { postGameStatisticsData } from "../services/WordpressFetchData";
|
||||
import { postGameStatisticsData, postGameStatisticsDataBackend } from "../services/WordpressFetchData";
|
||||
import { useLanguage } from "../hooks/useLanguage";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function Test() {
|
||||
const { language } = useLanguage();
|
||||
|
||||
function addPost() {
|
||||
postGameStatisticsData(language);
|
||||
function postStatistics() {
|
||||
postGameStatisticsDataBackend();
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -16,8 +15,8 @@ export default function Test() {
|
|||
<div className='screen screen--test'>
|
||||
<Menu />
|
||||
<div id='screen-container'>
|
||||
<button onClick={() => addPost()}>static data function Finish the game</button>
|
||||
<button onClick={() => test()}>Finish the game</button>
|
||||
<button onClick={postStatistics}> Test throught backend</button>
|
||||
{/* <button onClick={() => addPost()}>static data function Finish the game</button> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user