Skip to content

Commit bc6b6b5

Browse files
committed
Add 'moderation' to NotificationType to fix type error
1 parent aaa8408 commit bc6b6b5

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/common/BaseNotification/BaseNotification.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ interface Icons {
99
warning: React.ReactNode;
1010
error: React.ReactNode;
1111
mention: React.ReactNode;
12+
moderation: React.ReactNode;
1213
}
1314

14-
export type NotificationType = 'info' | 'mention' | 'success' | 'warning' | 'error';
15+
export type NotificationType = 'info' | 'mention' | 'success' | 'warning' | 'error' | 'moderation';
1516

1617
interface BaseNotificationProps {
1718
type: NotificationType;
@@ -27,6 +28,7 @@ export const BaseNotification: React.FC<BaseNotificationProps> = ({ type, mentio
2728
warning: <ExclamationCircleFilled />,
2829
error: <WarningFilled />,
2930
mention: mentionIconSrc,
31+
moderation: <WarningFilled />, // Using the same icon as error for moderation
3032
};
3133

3234
const icon = icons[type] || icons.warning;

src/constants/notificationsSeverities.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ export const notificationsSeverities: NotificationSeverity[] = [
2626
id: 4,
2727
name: 'mention',
2828
},
29+
{
30+
id: 5,
31+
name: 'moderation',
32+
},
2933
];

0 commit comments

Comments
 (0)