Skip to content

Commit e93b7fc

Browse files
committed
Adjusted CloseWindow component to only call window.close() when rendered, not when just imported
1 parent 79f49a6 commit e93b7fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web-ui/src/pages/CloseWindow.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
window.close();
1+
import React from 'react';
2+
import { useEffect } from 'react';
23

34
export default function CloseWindow() {
5+
useEffect(() => {
6+
window.close();
7+
}, []);
48
return <></>;
59
}

0 commit comments

Comments
 (0)