@@ -22,12 +22,13 @@ import { ToggleGroupValue } from '@/types/toggle';
2222import { NOTICE , SUCCESS } from '@/constants/message' ;
2323import { useTodayBalanceGameList } from '@/hooks/game/useTodayBalanceGameList' ;
2424import { todayTalkPickDummyData } from '@/mocks/data/banner' ;
25+ import { PATH } from '@/constants/path' ;
2526import * as S from './LandingPage.style' ;
2627
2728const LandingPage = ( ) => {
2829 const isMobile = useIsMobile ( ) ;
2930 const navigate = useNavigate ( ) ;
30- const { isOpen : isLoginModalOpen , openModal , closeModal } = useModal ( ) ;
31+ const { isOpen : isLoginModalOpen , closeModal } = useModal ( ) ;
3132 const { isVisible, modalText, showToastModal } = useToastModal ( ) ;
3233
3334 const { member } = useMemberQuery ( ) ;
@@ -63,10 +64,9 @@ const LandingPage = () => {
6364 } , [ isBestGamesEnabled , isLatestGamesEnabled , bestGames , latestGames ] ) ;
6465
6566 const processedContents = useMemo ( ( ) => {
66- if ( ! member ?. id ) return [ ] ;
6767 return contents . map ( ( item : GameContent ) => ( {
6868 ...item ,
69- showBookmark : item . writerId !== member . id ,
69+ showBookmark : member ?. id ? item . writerId !== member . id : true ,
7070 } ) ) ;
7171 } , [ contents , member ?. id ] ) ;
7272
@@ -95,7 +95,7 @@ const LandingPage = () => {
9595 if ( ! content . id ) return ;
9696
9797 if ( ! isLoggedIn ( ) ) {
98- openModal ( ) ;
98+ navigate ( `/ ${ PATH . LOGIN } ` ) ;
9999 return ;
100100 }
101101
@@ -113,7 +113,7 @@ const LandingPage = () => {
113113 } ) ;
114114 }
115115 } ,
116- [ createBookmark , deleteBookmark , openModal , showToastModal ] ,
116+ [ createBookmark , deleteBookmark , navigate , showToastModal ] ,
117117 ) ;
118118
119119 return (
0 commit comments