feat: port namespace store to pinia

This commit is contained in:
Dominik Pschenitschni 2022-09-02 11:15:29 +02:00
parent 9474240cb9
commit 093ab766d4
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
21 changed files with 214 additions and 166 deletions

View file

@ -1,11 +1,11 @@
import {ref, computed} from 'vue'
import {useStore} from '@/store'
import {useNamespaceStore} from '@/stores/namespaces'
export function useNameSpaceSearch() {
export function useNamespaceSearch() {
const query = ref('')
const store = useStore()
const namespaces = computed(() => store.getters['namespaces/searchNamespace'](query.value))
const namespaceStore = useNamespaceStore()
const namespaces = computed(() => namespaceStore.searchNamespace(query.value))
function findNamespaces(newQuery: string) {
query.value = newQuery