@@ -11,6 +11,7 @@ import { WelfareItemData, Item } from '@/types/welfareItemType';
1111import IconSearch from 'public/assets/icons/icon-search.svg' ;
1212import { useRouter } from 'next/navigation' ;
1313import { requestNotificationPermission } from '@/utils/pushNotification' ;
14+ import PopUp from '@/components/mobile/PopUp' ;
1415
1516export default function MobileMain ( ) {
1617 const [ isBottomSheetOpen , setIsBottomSheetOpen ] = useState ( false ) ;
@@ -19,6 +20,7 @@ export default function MobileMain() {
1920 items : [ ] ,
2021 } ) ;
2122 const [ searchQuery , setSearchQuery ] = useState ( '' ) ;
23+ const [ showPopUp , setShowPopUp ] = useState < boolean > ( false ) ;
2224 const router = useRouter ( ) ;
2325
2426 const fetchWelfareItems = async ( ) => {
@@ -47,6 +49,11 @@ export default function MobileMain() {
4749 fetchWelfareItems ( ) ;
4850
4951 requestNotificationPermission ( ) ;
52+
53+ // "다시 보지 않기" 플래그가 없으면 팝업 표시
54+ if ( ! localStorage . getItem ( 'popUpDismissed' ) ) {
55+ setShowPopUp ( true ) ;
56+ }
5057 } , [ ] ) ;
5158
5259 const handleSearchChange = ( e : React . ChangeEvent < HTMLInputElement > ) => {
@@ -103,6 +110,19 @@ export default function MobileMain() {
103110 </ section >
104111 </ div >
105112
113+ { showPopUp && (
114+ < PopUp
115+ title = "🚨 변경사항 안내 🚨"
116+ content = { `물품 대여 신청은 현재 시간으로부터
117+ 5분 후에 가능합니다.\n(16시 55분부터는 즉시 신청이 가능합니다.)` }
118+ onClickCta = { ( ) => setShowPopUp ( false ) }
119+ onClickOther = { ( ) => {
120+ localStorage . setItem ( 'popUpDismissed' , 'true' ) ;
121+ setShowPopUp ( false ) ;
122+ } }
123+ />
124+ ) }
125+
106126 { /* Bottom Sheet */ }
107127 < BottomSheet
108128 isOpen = { isBottomSheetOpen }
0 commit comments