Skip to content

Commit bf389cf

Browse files
committed
refactor : 토스트UI position 타입 수정
1 parent 0d39b7b commit bf389cf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/ToastItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { twMerge } from 'tailwind-merge';
55
interface ToastObj {
66
time: number;
77
toastType: 'Warning' | 'Success' | 'Error' | 'Info';
8-
position: 'TOP' | 'BOTTOM';
8+
position: 'Top' | 'Bottom';
99
title: string;
1010
onClick?: () => void;
1111
}
@@ -20,8 +20,8 @@ export default function ToastItem({ toastObj, index }: { toastObj: ToastObj; ind
2020
};
2121

2222
const TOAST_POSITION = {
23-
TOP: 'top-20',
24-
BOTTOM: 'bottom-20',
23+
Top: 'top-20',
24+
Bottom: 'bottom-20',
2525
};
2626

2727
const animation = `toast-blink ${toastObj.time}s ease-in-out forwards`;

src/hooks/useServerSentEvents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const useServerSentEvents = () => {
3737
setToastActive({
3838
toastType: 'Info',
3939
title: '새 알림이 도착했어요!',
40-
position: 'TOP',
40+
position: 'Top',
4141
time: 5,
4242
onClick: () => navigate('/mypage/notifications'),
4343
});

src/stores/toastStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { create } from 'zustand';
33
interface ToastObj {
44
time: number;
55
toastType: 'Warning' | 'Success' | 'Error' | 'Info';
6-
position: 'TOP' | 'BOTTOM';
6+
position: 'Top' | 'Bottom';
77
title: string;
88
onClick?: () => void;
99
}
@@ -18,7 +18,7 @@ interface ToastStore {
1818
const toastObjFormat: ToastObj = {
1919
time: 2,
2020
toastType: 'Info',
21-
position: 'BOTTOM',
21+
position: 'Bottom',
2222
title: '',
2323
onClick: () => {},
2424
};

0 commit comments

Comments
 (0)