diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorSaveResultModal.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorSaveResultModal.tsx
index 463b9b76a..f6cfe4e8c 100644
--- a/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorSaveResultModal.tsx
+++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/UiEditorSaveResultModal.tsx
@@ -30,17 +30,27 @@ export function UiEditorSaveResultModal({
ariaLabel={ariaLabelForNotice(notice)}
panelClassName="w-[min(460px,calc(100vw-2rem))] rounded-2xl p-5"
>
- {notice?.kind === 'generated' ? (
-
- ) : notice?.kind === 'saved' ? (
-
- ) : notice?.kind === 'failure' ? (
-
- ) : null}
+ {renderNoticeContent(notice, onClose)}
);
}
+function renderNoticeContent(
+ notice: UiEditorSaveResultNotice | null,
+ onClose: () => void,
+) {
+ if (!notice) return null;
+ if (notice.kind === 'generated') {
+ return (
+
+ );
+ }
+ if (notice.kind === 'saved') {
+ return ;
+ }
+ return ;
+}
+
function GeneratedNotice({
relativePath,
onClose,