-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move the add form into the notification tabs
- Loading branch information
1 parent
14f6d10
commit a47f99f
Showing
2 changed files
with
41 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 9 additions & 33 deletions
42
src/pages/Settings/notifications/NotificationSilencedAddPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,18 @@ | ||
import NotificationTabsLinks from "@flanksource-ui/components/Notifications/NotificationTabsLinks"; | ||
import NotificationSilenceForm from "@flanksource-ui/components/Notifications/SilenceNotificationForm/NotificationSilenceForm"; | ||
import { | ||
BreadcrumbChild, | ||
BreadcrumbNav, | ||
BreadcrumbRoot | ||
} from "@flanksource-ui/ui/BreadcrumbNav"; | ||
import { Head } from "@flanksource-ui/ui/Head"; | ||
import { SearchLayout } from "@flanksource-ui/ui/Layout/SearchLayout"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
export default function NotificationSilencedAddPage() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<> | ||
<Head prefix="Silence Notification" /> | ||
<SearchLayout | ||
title={ | ||
<BreadcrumbNav | ||
list={[ | ||
<BreadcrumbRoot link="/notifications" key="breadcrumb"> | ||
Notifications | ||
</BreadcrumbRoot>, | ||
<BreadcrumbChild link="/notifications/silences" key={"silence"}> | ||
Silences | ||
</BreadcrumbChild>, | ||
<BreadcrumbChild key={"add"}>Add</BreadcrumbChild> | ||
]} | ||
/> | ||
} | ||
contentClass="p-0 h-full" | ||
> | ||
<div className="mx-auto flex h-full max-w-screen-md flex-1 flex-col px-6 py-6 pb-0"> | ||
<h3 className="text-xl font-semibold">Silence Notification</h3> | ||
<NotificationSilenceForm | ||
onSuccess={() => navigate("/notifications/silences")} | ||
/> | ||
</div> | ||
</SearchLayout> | ||
</> | ||
<NotificationTabsLinks activeTab={"Silences"} isAddSilence> | ||
<div className="mx-auto flex h-full max-w-screen-md flex-1 flex-col px-6 py-6 pb-0"> | ||
<h3 className="px-4 text-xl font-semibold">Silence Notification</h3> | ||
<NotificationSilenceForm | ||
onSuccess={() => navigate("/notifications/silences")} | ||
/> | ||
</div> | ||
</NotificationTabsLinks> | ||
); | ||
} |