diff --git a/src/App.vue b/src/App.vue index 767ab39..c151d20 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,9 +2,11 @@
+
diff --git a/src/components/StaFooter.vue b/src/components/StaFooter.vue new file mode 100644 index 0000000..7f3f784 --- /dev/null +++ b/src/components/StaFooter.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/composables/useMeta.ts b/src/composables/useMeta.ts new file mode 100644 index 0000000..4f17da0 --- /dev/null +++ b/src/composables/useMeta.ts @@ -0,0 +1,29 @@ +import { onMounted, ref } from 'vue'; +import type { components } from '../api/schema'; +import { apiClient } from '../api/client'; + +type Meta = components['schemas']['Meta']; + +export function useMeta() { + const isLoading = ref(false); + const metadata = ref(null); + const error = ref(null); + + const getMetadata = async () => { + isLoading.value = true; + try { + const { data } = await apiClient.GET('/api/meta'); + error.value = null; + metadata.value = data as Meta; + } catch (err: any) { + console.error('Failed to fetch metadata:', err); + error.value = err.message || 'Failed to fetch metadata'; + } finally { + isLoading.value = false; + } + }; + + onMounted(getMetadata); + + return { isLoading, metadata, error }; +}