File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1+ node_modules /
Original file line number Diff line number Diff line change 11'use client' ;
22
3- import { useState } from 'react' ;
3+ import { useEffect , useState } from 'react' ;
44import Flex from '../../components/Flex' ;
55
66export default function AndroidUpgradeNotification ( ) {
7- const androidUpgradeNotificationDismissed = localStorage . getItem (
8- 'relistenAndroidNotificationDismissed'
9- ) ;
10- const [ alertVisible , setAlertVisible ] = useState ( ! androidUpgradeNotificationDismissed ) ;
7+ const [ alertVisible , setAlertVisible ] = useState ( false ) ;
118
129 const dismissAlert = ( ) => {
1310 localStorage . setItem ( 'relistenAndroidNotificationDismissed' , 'true' ) ;
1411 setAlertVisible ( false ) ;
1512 } ;
1613
14+ useEffect ( ( ) => {
15+ const androidUpgradeNotificationDismissed = localStorage . getItem (
16+ 'relistenAndroidNotificationDismissed'
17+ ) ;
18+
19+ setAlertVisible ( ! androidUpgradeNotificationDismissed ) ;
20+ } , [ ] ) ;
21+
1722 return alertVisible ? (
1823 < Flex column className = "border-b-[1px] border-b-[#aeaeae]" >
1924 < section className = "relative my-2 flex flex-col justify-center" >
You can’t perform that action at this time.
0 commit comments