composables, mazani letu, skeletony
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import {ref} from "vue";
|
||||
import {useCopilotsStore} from "stores/Copilots";
|
||||
import {storeToRefs} from "pinia";
|
||||
|
||||
export const loading = ref(true);
|
||||
export const copilot = ref(null);
|
||||
export const fetchCopilot = (copilotId) => {
|
||||
loading.value = true;
|
||||
useCopilotsStore().fetchDetail(parseInt(copilotId))
|
||||
.then(resp => copilot.value = resp)
|
||||
.finally(() => loading.value = false);
|
||||
}
|
||||
|
||||
export const copilots = storeToRefs(useCopilotsStore()).items;
|
||||
export const fetchCopilots = () => {
|
||||
loading.value = true;
|
||||
useCopilotsStore().fetch().finally(() => loading.value = false);
|
||||
}
|
||||
Reference in New Issue
Block a user