mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
wrapped all team data in a single object and socket message
This commit is contained in:
@@ -26,6 +26,9 @@ function MapPan(props) {
|
||||
|
||||
export default function LiveMap({ ...props}) {
|
||||
const {currentPosition, enemyPosition} = useGame();
|
||||
useEffect(() => {
|
||||
console.log('Current position', currentPosition);
|
||||
}, [currentPosition]);
|
||||
return (
|
||||
<MapContainer {...props} className='min-h-full z-0' center={[0,0]} zoom={0} scrollWheelZoom={true}>
|
||||
<TileLayer
|
||||
@@ -58,3 +61,16 @@ export default function LiveMap({ ...props}) {
|
||||
</MapContainer>
|
||||
)
|
||||
}
|
||||
|
||||
export function PlacementMap({ ...props}) {
|
||||
const {currentPosition, startingArea} = useGame();
|
||||
return (
|
||||
<MapContainer {...props} className='min-h-full w-full' scrollWheelZoom={true}>
|
||||
<TileLayer
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
<MapPan center={currentPosition}/>
|
||||
</MapContainer>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user