create useFontLists() to fetch font list
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user