Skip to content

Commit eeab90e

Browse files
committed
fix: update local storage after the modal is closed
1 parent b15b79c commit eeab90e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/shared/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ const Modal: FC = () => {
1010
const localStorageValue = localStorage.getItem(localStorageKey)
1111
if (!localStorageValue) {
1212
setShow(true)
13-
localStorage.setItem(localStorageKey, 'true')
1413
}
1514
}
1615
}, []);
1716

1817
const handleModalClose = (): void => {
1918
setShow(false)
19+
localStorage.setItem(localStorageKey, 'true')
2020
}
2121

2222
if (!show) {

0 commit comments

Comments
 (0)