create useFontLists() to fetch font list
This commit is contained in:
1 parent
6e1b70f2dc
commit
2959090043
1 file changed
+12
@@ -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