From 89a723381c0c037da19d76532be7b631cc702dca Mon Sep 17 00:00:00 2001 From: Alexander Lee Date: Mon, 3 Oct 2022 23:08:44 +0800 Subject: [PATCH] Feat: add story for no notification case --- src/components/Header/Header.stories.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/Header/Header.stories.tsx b/src/components/Header/Header.stories.tsx index b07667fbc7..7ee505d622 100644 --- a/src/components/Header/Header.stories.tsx +++ b/src/components/Header/Header.stories.tsx @@ -3,7 +3,11 @@ import { MemoryRouter, Route } from "react-router-dom" import { SiteEditHeader } from "layouts/layouts/SiteEditLayout" -import { buildAllNotificationData, buildGetStagingUrlData } from "mocks/utils" +import { + buildRecentNotificationData, + buildAllNotificationData, + buildGetStagingUrlData, +} from "mocks/utils" import { handlers } from "../../mocks/handlers" @@ -49,4 +53,15 @@ LoadingAll.parameters = { }, } +export const NoNotifications = Template.bind({}) +NoNotifications.parameters = { + msw: { + handlers: [ + buildRecentNotificationData([]), + buildAllNotificationData([]), + ...handlers, + ], + }, +} + export default HeaderMeta