mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +01:00
24 lines
723 B
JavaScript
24 lines
723 B
JavaScript
"use client";
|
|
import ActionDrawer from '@/components/team/actionDrawer';
|
|
import { useTeamConnexion } from '@/context/teamConnexionContext';
|
|
import useGame, { GameState } from '@/hook/useGame';
|
|
import dynamic from 'next/dynamic';
|
|
import React from 'react'
|
|
|
|
//Load the map without SSR
|
|
const LiveMap = dynamic(() => import('@/components/team/map'), {
|
|
ssr: false
|
|
});
|
|
|
|
export default function Track() {
|
|
const { gameState } = useGame();
|
|
const {useProtect} = useTeamConnexion();
|
|
useProtect();
|
|
return (
|
|
gameState == GameState.PLAYING && <div className='h-full'>
|
|
<LiveMap currentPosition={currentPosition} enemyPosition={enemyPosition} />
|
|
<ActionDrawer />
|
|
</div>
|
|
)
|
|
}
|