diff --git a/src/utils/proxy/use-widget-api.js b/src/utils/proxy/use-widget-api.js index f9235d787..52e986e1b 100644 --- a/src/utils/proxy/use-widget-api.js +++ b/src/utils/proxy/use-widget-api.js @@ -7,7 +7,7 @@ export default function useWidgetAPI(widget, ...options) { if (options && options[1]?.refreshInterval) { config.refreshInterval = options[1].refreshInterval; } - const { data, error } = useSWR(formatProxyUrl(widget, ...options), config); + const { data, error, mutate } = useSWR(formatProxyUrl(widget, ...options), config); // make the data error the top-level error - return { data, error: data?.error ?? error } + return { data, error: data?.error ?? error, mutate } }