Skip to content

Commit

Permalink
fix: update store
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Aug 16, 2021
1 parent d4887bb commit 799f625
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/utils/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { createGlobalState } from '@vueuse/core';
import { shallowRef } from 'vue';
import { reactive, shallowRef } from 'vue';

export const useGlobalState = createGlobalState(() => {
return {
// MapKit
mapkit: shallowRef({} as typeof window.mapkit),
// Map
mapInit: false as boolean,
mapLoad: false as boolean,
ui: reactive({
init: false as boolean,
load: false as boolean,
geocoderLoad: false as boolean,
searchLoad: false as boolean,
}),
map: shallowRef({} as mapkit.Map),
// Geocoder
geocoderLoad: false as boolean,
geocoder: shallowRef({} as mapkit.Geocoder),
// Search
searchLoad: false as boolean,
search: shallowRef({} as mapkit.Search),
};
});

0 comments on commit 799f625

Please sign in to comment.