This commit is contained in:
2025-07-11 15:25:07 +07:00
parent a8068553be
commit 14dbe01920
13 changed files with 984 additions and 751 deletions

No files matched your search

+22 -20
View File
@@ -1,23 +1,25 @@
import { defineStore } from 'pinia';
import { defineStore } from "pinia";
// project imports
import axios from '@/utils/axios';
import axios from "@/utils/axios";
export const useContactStore = defineStore({
id: 'Contact',
state: () => ({
contacts: []
}),
getters: {},
actions: {
// Fetch followers from action
async fetchContacts() {
try {
const response = await axios.get('/api/contacts');
this.contacts = response.data.contacts;
} catch (error) {
alert(error);
console.log(error);
}
}
}
export const useContactStore = defineStore('Contact', {
state: () => ({
contacts: [],
}),
getters: {},
actions: {
// Fetch followers from action
async fetchContacts() {
try {
const response = await axios.get("/api/contacts");
this.contacts = response.data.contacts;
} catch (error) {
alert(error);
console.log(error);
}
},
},
});