mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
wrapped proxy calls via useWidgetAPI
This commit is contained in:
parent
649f0038bc
commit
0a58f259ff
30 changed files with 115 additions and 153 deletions
7
src/utils/proxy/use-widget-api.js
Normal file
7
src/utils/proxy/use-widget-api.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import useSWR from "swr";
|
||||
|
||||
import { formatProxyUrl } from "./api-helpers";
|
||||
|
||||
export default function useWidgetAPI(widget, ...options) {
|
||||
return useSWR(formatProxyUrl(widget, ...options));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue