diff --git a/app/components/Admin/ModalForm.vue b/app/components/Admin/ModalForm.vue new file mode 100644 index 0000000..adadc00 --- /dev/null +++ b/app/components/Admin/ModalForm.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/app/components/artist/Name.vue b/app/components/Artist/Name.vue similarity index 100% rename from app/components/artist/Name.vue rename to app/components/Artist/Name.vue diff --git a/app/composables/useApiFetch.ts b/app/composables/useApiFetch.ts index ffda4ce..ffc0241 100644 --- a/app/composables/useApiFetch.ts +++ b/app/composables/useApiFetch.ts @@ -3,9 +3,9 @@ import defu from "defu" export function useApiFetch( url: string | Request | Ref | (() => string | Request), - options: UseFetchOptions = {}, + options?: UseFetchOptions, authorize: boolean = true -) { +): ReturnType> { const baseUrl = import.meta.env.VITE_PUBLIC_BACKEND if (!baseUrl) throw new Error("BACKEND URL not set") @@ -39,10 +39,7 @@ export function useApiFetch( }, } - const config = defu(options || {}, defaults) as UseFetchOptions< - DataT, - ErrorT - > + const config: UseFetchOptions = defu(options ?? {}, defaults) // @ts-ignore return useFetch(url, config) diff --git a/app/layouts/admin.vue b/app/layouts/admin.vue new file mode 100644 index 0000000..5746e30 --- /dev/null +++ b/app/layouts/admin.vue @@ -0,0 +1,101 @@ + + + diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 5eaa024..8f25c6c 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -11,6 +11,8 @@ const onSearchInput = (v: string) => { else router.replace("/search") }, 300) } + +const { data: user } = useApiFetch("/user")