diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 787ca0a3..af4973d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6839,7 +6839,7 @@ packages: /@vueuse/shared@10.0.0(vue@3.3.4): resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==} dependencies: - vue-demi: 0.14.5(vue@3.3.4) + vue-demi: 0.14.10(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue diff --git a/src/tools/tools.store.ts b/src/tools/tools.store.ts index fb12450d..5a4afc71 100644 --- a/src/tools/tools.store.ts +++ b/src/tools/tools.store.ts @@ -24,9 +24,11 @@ export const useToolStore = defineStore('tools', () => { const toolsByCategory = computed(() => { return _.chain(tools.value) .groupBy('category') + .map((components, name, path) => ({ .map((components, name, path) => ({ name, path, + path, components, })) .value(); @@ -34,6 +36,7 @@ export const useToolStore = defineStore('tools', () => { const favoriteTools = computed(() => { return favoriteToolsName.value + .map(favoriteName => tools.value.find(({ name, path }) => name === favoriteName || path === favoriteName)) .map(favoriteName => tools.value.find(({ name, path }) => name === favoriteName || path === favoriteName)) .filter(Boolean) as ToolWithCategory[]; // cast because .filter(Boolean) does not remove undefined from type }); @@ -53,6 +56,7 @@ export const useToolStore = defineStore('tools', () => { removeToolFromFavorites({ tool }: { tool: MaybeRef }) { favoriteToolsName.value = favoriteToolsName.value.filter(name => get(tool).name !== name && get(tool).path !== name); + favoriteToolsName.value = favoriteToolsName.value.filter(name => get(tool).name !== name && get(tool).path !== name); }, isToolFavorite({ tool }: { tool: MaybeRef }) {