Skip to content

Commit

Permalink
feat: 알림탭에서 알림이 없을 경우 Empty Section 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Aug 26, 2024
1 parent df8759f commit 95befe7
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { colors } from '@sds/theme';
import { ReactNode } from 'react';

import { EmptyView } from '@/common/components';
import { AlarmEventType } from '@/home/common/apis/schema/Notification.schema';

interface NotificationListProps {
Expand All @@ -9,6 +10,18 @@ interface NotificationListProps {
}

export const NotificationList = ({ notificationList, renderItem }: NotificationListProps) => {
if (notificationList?.length === 0) {
return (
<div
css={{
borderTop: `1px solid ${colors.grey400}`,
}}
>
<EmptyView title="알림이 없어요" style={{ height: 'calc(100vh - 142px)' }} />;
</div>
);
}

return (
<ul
css={{
Expand Down

0 comments on commit 95befe7

Please sign in to comment.