Skip to content

Commit a19693c

Browse files
authored
Merge pull request #231 from woorifisa-projects-3rd/feat/TK-212-코드-리팩토링-
[fix/TK-212]:알림 페이지에서 알림 배지 비활성화
2 parents 41075e8 + ca3e712 commit a19693c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

apps/mobile/app/travel/[id]/form/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { motion } from 'framer-motion';
1313
import styles from './page.module.css';
1414
import useSWR from 'swr';
1515
import { TravelFormData } from '@withbee/types';
16+
import { mutate } from 'swr';
1617

1718
function 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 {

packages/ui/src/title.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)