1+ 'use client' ;
2+
13import { useSuspenseQuery } from '@tanstack/react-query' ;
2- import { useEffect , useState } from 'react' ;
4+ import { useState } from 'react' ;
5+
6+ import { gatheringAPIService } from '../service' ;
37
4- import { gatheringAPIService } from '@/app/invite/gathering/[gatheringId]/src/service' ;
58import { CardFrame } from '@/app/proposal/[proposalId]/detail/components/GatheringProposalContent' ;
69import AppInstallBanner from '@/shared/components/AppInstallBanner' ;
710import { useParam } from '@/shared/hooks/useParam' ;
811import { cn } from '@/shared/lib' ;
912
10- const BANNER_KEY = 'gathering-banner-dismissed-at' ;
11- const BANNER_RESHOW_MINUTES = 30 ;
13+ // const BANNER_KEY = 'gathering-banner-dismissed-at';
14+ // const BANNER_RESHOW_MINUTES = 30;
1215
1316const InviteGatheringContent = ( ) => {
1417 const gatheringId = Number ( useParam ( 'gatheringId' ) ) ;
@@ -18,50 +21,50 @@ const InviteGatheringContent = () => {
1821 queryFn : ( ) => gatheringAPIService . getGatheringName ( gatheringId ) ,
1922 } ) ;
2023
21- const [ showBanner , setShowBanner ] = useState ( false ) ;
24+ const [ showBanner , setShowBanner ] = useState ( true ) ;
2225
2326 const handleCloseBanner = ( ) => {
24- localStorage . setItem ( BANNER_KEY , Date . now ( ) . toString ( ) ) ;
27+ // localStorage.setItem(BANNER_KEY, Date.now().toString());
2528 setShowBanner ( false ) ;
2629 } ;
2730
28- useEffect ( ( ) => {
29- const dismissedAt = localStorage . getItem ( BANNER_KEY ) ;
30- const now = Date . now ( ) ;
31-
32- if ( ! dismissedAt ) {
33- setShowBanner ( true ) ;
34- } else {
35- const dismissedTime = parseInt ( dismissedAt , 10 ) ;
36- const thirtyMinutes = BANNER_RESHOW_MINUTES * 60 * 1000 ;
37- if ( now - dismissedTime > thirtyMinutes ) {
38- setShowBanner ( true ) ;
39- }
40- }
41- } , [ ] ) ;
31+ // useEffect(() => {
32+ // const dismissedAt = localStorage.getItem(BANNER_KEY);
33+ // const now = Date.now();
34+ // if (!dismissedAt) {
35+ // setShowBanner(true);
36+ // } else {
37+ // const dismissedTime = parseInt(dismissedAt, 10);
38+ // const thirtyMinutes = BANNER_RESHOW_MINUTES * 60 * 1000;
39+ // if (now - dismissedTime > thirtyMinutes) {
40+ // setShowBanner(true);
41+ // }
42+ // }
43+ // }, []);
4244
4345 return (
4446 < >
4547 { showBanner && < AppInstallBanner onClose = { handleCloseBanner } /> }
4648
49+ { /* 배너 노출 시: safe-area 포함하여 충분한 상단 여백 확보 */ }
4750 < h2
4851 className = { cn (
4952 'serif-title-22-M font-bold text-gray-900' ,
50- showBanner ? 'mt-[6.875rem ]' : 'mt-[1.875rem]'
53+ showBanner ? 'mt-[calc(110px+env(safe-area-inset-top,0px)) ]' : 'mt-[1.875rem]'
5154 ) }
5255 >
5356 모임에
5457 < br />
5558 참여하시겠어요?
5659 </ h2 >
5760
58- < div className = "relative mt-[70px] flex flex-col items-center justify-center" >
61+ { /* 카드/프레임 영역 */ }
62+ < div className = "relative mt-[56px] flex flex-col items-center justify-center" >
63+ { /* 카드 배경 박스 (그림자/여백 안정화) */ }
5964 < div className = "h-[320px] w-[278px] rounded-[10px] bg-gray-50" />
60- < div
61- className = { cn (
62- 'absolute bottom-[-80px] left-1/2 h-[421px] w-[408px] -translate-x-1/2 translate-y-0'
63- ) }
64- >
65+
66+ { /* 프레임을 살짝 겹치게 띄워서 시각적 포커스 */ }
67+ < div className = "pointer-events-none absolute bottom-[-80px] left-1/2 h-[421px] w-[408px] -translate-x-1/2" >
6568 < div className = "relative size-full" >
6669 < div className = "absolute inset-0 z-0" >
6770 < CardFrame />
0 commit comments