Added nanostore logic to centralise data

This commit is contained in:
Alexis
2023-10-13 17:19:58 +02:00
parent 4e1927bf02
commit e654d3f96a
7 changed files with 98 additions and 30 deletions

View File

@@ -1,12 +1,10 @@
---
import type { MapMarker } from '@/types/Leaflet';
import { allTasks } from 'nanostores';
import { $world } from './worldStore';
interface Props {
markers: MapMarker[];
players?: MapMarker;
}
const { markers, players } = Astro.props
$world.listen(() => {})
await allTasks()
const { markers, players } = $world.get()
---
<div class="world-wrapper">