This commit is contained in:
2024-08-30 18:15:07 +02:00
parent 8cadaf08a0
commit c77503ed45
17 changed files with 273 additions and 149 deletions

18
app/composables/icons.ts Normal file
View File

@@ -0,0 +1,18 @@
export function useIcons() {
const loading = ref(false)
async function search(query: string) {
if (query) {
loading.value = true
}
const response = await $fetch('/api/icons/search', {
query: { query },
})
loading.value = false
return response.icons
}
return {
loading,
search,
}
}