File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
apps/mobile/app/travel/[id]/form Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { motion } from 'framer-motion';
1313import styles from './page.module.css' ;
1414import useSWR from 'swr' ;
1515import { TravelFormData } from '@withbee/types' ;
16+ import { mutate } from 'swr' ;
1617
1718function TravelFormContent ( ) {
1819 const [ editedTravel , setEditedTravel ] = useState < TravelFormData | null > ( null ) ;
@@ -43,6 +44,7 @@ function TravelFormContent() {
4344 ) ;
4445
4546 if ( response ) {
47+ mutate ( ( key : string ) => key . startsWith ( 'travelList' ) ) ;
4648 showToast . success ( { message : '여행이 편집이 완료되었습니다.' } ) ;
4749 router . push ( `/travel/${ params . id } ` ) ;
4850 } else {
Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ export const Title = ({
3030 refreshInterval : 1000 ,
3131 } ) ;
3232
33+ const notificationIcon =
34+ pathname === '/notification'
35+ ? NoMsg // 알림 페이지면 NoMsg로 고정
36+ : hasNotification
37+ ? isMsg
38+ : NoMsg ; // 다른 페이지면 기존 로직 유지
39+
3340 useEffect ( ( ) => {
3441 if (
3542 isMsgData &&
@@ -80,7 +87,7 @@ export const Title = ({
8087 < h1 className = { styles . label } > { label } </ h1 >
8188 < Link href = "/notification" >
8289 < Image
83- src = { hasNotification ? isMsg : NoMsg }
90+ src = { notificationIcon }
8491 alt = "알림"
8592 width = { 20 }
8693 height = { 20 }
You can’t perform that action at this time.
0 commit comments