···88 const [isOpen, setIsOpen] = useState(false)
991010 const open = () => setIsOpen(true)
1111- const close = () => {
1212- setIsOpen(false)
1313- // Mark that user has actively closed the modal, don't show again this session
1414- if (typeof window !== 'undefined') {
1515- sessionStorage.setItem('welcomeModalClosed', 'true')
1616- }
1717- }
1111+ const close = () => setIsOpen(false)
18121913 useEffect(() => {
2014 // Only show modal if:
2115 // 1. User is not logged in
2216 // 2. We're on the web (this is a web-only feature)
2317 // 3. We're on the homepage (path is '/' or '/home')
2424- // 4. User hasn't actively closed the modal in this session
1818+ // 4. Modal hasn't been shown before
2519 if (IS_WEB && !hasSession && typeof window !== 'undefined') {
2620 const currentPath = window.location.pathname
2721 const isHomePage = currentPath === '/'
2828- const hasUserClosedModal =
2929- sessionStorage.getItem('welcomeModalClosed') === 'true'
2222+ const hasModalBeenShown =
2323+ localStorage.getItem('welcomeModalShown') === 'true'
30243131- if (isHomePage && !hasUserClosedModal) {
2525+ if (isHomePage && !hasModalBeenShown) {
2626+ // Mark that the modal has been shown, don't show again
2727+ localStorage.setItem('welcomeModalShown', 'true')
3228 // Small delay to ensure the page has loaded
3329 const timer = setTimeout(() => {
3430 open()