Ensure error message is cleared upon refreshing or restarting app

This commit is contained in:
Will Chen
2025-04-15 21:32:51 -07:00
parent a6981a061c
commit dfecc62ce3
2 changed files with 4 additions and 0 deletions

View File

@@ -273,6 +273,7 @@ export const PreviewIframe = ({
// Function to handle reload
const handleReload = () => {
setReloadKey((prevKey) => prevKey + 1);
setErrorMessage(undefined);
// Optionally, add logic here if you need to explicitly stop/start the app again
// For now, just changing the key should remount the iframe
console.debug("Reloading iframe preview for app", selectedAppId);