From 295909004325f56cbcc3b0472f6ae1ab8bfa50b3 Mon Sep 17 00:00:00 2001 From: Techit Thawiang Date: Sun, 28 Sep 2025 18:57:47 +0700 Subject: [PATCH] create useFontLists() to fetch font list --- composables/useFontLists.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 composables/useFontLists.ts diff --git a/composables/useFontLists.ts b/composables/useFontLists.ts new file mode 100644 index 0000000..05460d7 --- /dev/null +++ b/composables/useFontLists.ts @@ -0,0 +1,12 @@ +export const useFontLists = (fontUrl: string, fontListFile: string) => { + const {data: fonts, error, pending} = useFetch(fontUrl + fontListFile, { + key: 'font-lists', + server: false, + lazy: false, + }); + return { + fonts, + error, + pending + } +} \ No newline at end of file