wrapped proxy calls via useWidgetAPI

This commit is contained in:
Ben Phelps 2022-09-27 22:59:14 +03:00
parent 649f0038bc
commit 0a58f259ff
30 changed files with 115 additions and 153 deletions

View 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));
}