introducing game component

This commit is contained in:
Antoine M 2024-02-01 18:23:49 +01:00
parent 3dfeb65858
commit dccc7c17b4
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,10 @@
.page-container--play {
// @apply pt-32;
.screen {
@apply pt-20;
}
.salut {
@apply bg-red-300;
}
}

28
src/pages/Game.jsx Normal file
View File

@ -0,0 +1,28 @@
import Menu from "../components/Menu";
import { useWordpressData } from "../hooks/WordpressFetchData";
export default function Game() {
const screenData = useWordpressData("/search-and-find");
if (!screenData) return;
console.log(screenData[0]);
return (
<div className='page-container page-container--play'>
<div className='screen'>
<Menu />
<div className='salut'>helloo</div>
<section className='screen__game'>
<h1>{screenData[0].title.rendered}</h1>
{screenData && <h2>{screenData[0].title.rendered}</h2>}
{screenData && (
<div
dangerouslySetInnerHTML={{
__html: screenData[0].content.rendered,
}}
/>
)}
</section>
</div>
</div>
);
}