investment page/curency switcher

This commit is contained in:
2025-06-05 15:53:41 +02:00
parent a7c4ff51ca
commit c7d71ddb21
17 changed files with 515 additions and 156 deletions

View File

@ -47,9 +47,6 @@ export const useMapStore = defineStore("mapStore", () => {
"se"
]);
const countryList = ref<CountryList[]>()
const countries = ref<CountryList[]>()
// async function getPartnersList() {
// try {
// const res = await fetch(
@ -94,36 +91,11 @@ export const useMapStore = defineStore("mapStore", () => {
// }
// }
async function getCountries() {
try {
const res = await fetch(
`http://127.0.0.1:4000/api/public/countries`,
{
headers: {
"Content-Type": "application/json",
},
}
);
if (!res.ok) {
throw new Error(`HTTP error: ${res.status}`);
}
const data = await res.json();
countries.value = data.ata
} catch (error) {
console.error("getList error:", error);
}
}
return {
partnersList,
customersList,
// countryList,
countries,
// getPartnersList,
// getCustomerList,
getCountries
};
});