mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
changed buttons for a drawer in the track page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
import ActionDrawer from '@/components/team/actionDrawer';
|
||||
import Button from '@/components/util/button';
|
||||
import useGame from '@/hook/useGame';
|
||||
import dynamic from 'next/dynamic';
|
||||
@@ -11,7 +12,7 @@ const LiveMap = dynamic(() => import('@/components/team/map'), {
|
||||
});
|
||||
|
||||
export default function Track() {
|
||||
const { currentPosition, enemyPosition, loggedIn, sendCurrentPosition } = useGame();
|
||||
const { currentPosition, enemyPosition, loggedIn } = useGame();
|
||||
useEffect(() => {
|
||||
if (!loggedIn) {
|
||||
redirect("/team");
|
||||
@@ -20,22 +21,9 @@ export default function Track() {
|
||||
|
||||
|
||||
return (
|
||||
<div className='h-full flex flex-col justify-between justify-items-stretch'>
|
||||
<div className='h-5/6'>
|
||||
<LiveMap currentPosition={currentPosition} enemyPosition={enemyPosition}/>
|
||||
</div>
|
||||
<div className="h-1/6">
|
||||
<Button onClick={sendCurrentPosition}>Update position</Button>
|
||||
</div>
|
||||
<div className='shadow-lg m-5 p-2 flex flex-col text-center mx-auto w-4/5 rounded'>
|
||||
<p className='text-xl text-black'>30min</p>
|
||||
<p className='text-gray-700'> before penalty</p>
|
||||
<div className='w-1/2 flex flex-row justify-center mx-auto'>
|
||||
<div className='min-h-5 m-2 min-w-5 bg-green-400'></div>
|
||||
<div className='min-h-5 m-2 min-w-5 bg-green-400'></div>
|
||||
<div className='min-h-5 m-2 min-w-5 bg-green-400'></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='h-full'>
|
||||
<LiveMap currentPosition={currentPosition} enemyPosition={enemyPosition}/>
|
||||
<ActionDrawer />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user