18 lines
444 B
JavaScript
18 lines
444 B
JavaScript
//redux/slices/readPoiMarkersStoreSlice.js
|
|
import { atom } from "recoil";
|
|
|
|
const storeKey = "readPoiMarkersStore";
|
|
|
|
// Verhindert doppelte Registrierung bei HMR
|
|
export const readPoiMarkersStore =
|
|
globalThis.readPoiMarkersStore ||
|
|
atom({
|
|
key: storeKey,
|
|
default: [],
|
|
});
|
|
|
|
// Speichert das Atom im globalen Namespace (nur in Dev)
|
|
if (process.env.NODE_ENV !== "production") {
|
|
globalThis.readPoiMarkersStore = readPoiMarkersStore;
|
|
}
|