Automatically refresh app iframe

This commit is contained in:
Will Chen
2025-04-18 14:21:38 -07:00
parent 86b9720179
commit 59de308e82
4 changed files with 18 additions and 3 deletions

View File

@@ -106,5 +106,10 @@ export function useRunApp() {
}
}, []);
return { loading, error, runApp, stopApp, restartApp, app };
const refreshAppIframe = useCallback(async () => {
setPreviewPanelKey((prevKey) => prevKey + 1);
setError(null);
}, [setPreviewPanelKey, setError]);
return { loading, error, runApp, stopApp, restartApp, app, refreshAppIframe };
}