Skip to content

Refactor Store #12

@marySalvi

Description

@marySalvi

refactor to use Array.prototype.find instead.

https://github.com/ResonantGeoData/RGD-Vue/blob/51f891a0fba0652ddadedd8ef421765a2a239000/src/store/search.ts#L142-L145

`if (region) {
  drawerContents.value = regionsList.value.filter(
    (entry) => entry.id === spatialId,
  )[0].properties;`

refactor to use delete visibleFootprints.value[key] instead

https://github.com/ResonantGeoData/RGD-Vue/blob/51f891a0fba0652ddadedd8ef421765a2a239000/src/store/cesium/footprints.ts#L32-L37

if (visibleFootprints.value[key]) { visibleFootprints.value = Object.fromEntries( Object.entries(visibleFootprints.value).filter(([k]) => k !== key), ); } };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions