introducing game component
This commit is contained in:
parent
3dfeb65858
commit
dccc7c17b4
10
src/assets/css/pages/Game.scss
Normal file
10
src/assets/css/pages/Game.scss
Normal 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
28
src/pages/Game.jsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user