mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
wrapped proxy calls via useWidgetAPI
This commit is contained in:
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));
|
||||
}
|
||||
Reference in New Issue
Block a user