This commit is contained in:
Alex Holliday committed 2026-01-29 18:14:23 +00:00
1 parent 6395e8a10e
commit 6ffa5ac648
4 files changed
+142 -7

No files matched your search

+24 -7
View File
@@ -1,25 +1,42 @@
import { BasePageWithStates } from "@/Components/v2/design-elements";
import { NotificationsTable } from "@/Pages/Notifications/components/NotificationsTable";
import { useState } from "react";
import { useGet } from "@/Hooks/UseApi";
import { useTranslation } from "react-i18next";
import type { Notification } from "@/Types/Notification";
const NotificationsPage = () => {
const { t } = useTranslation();
const [selectedChannel, setSelectedChannel] = useState<Notification | null>(null);
const {
data: notifications,
isLoading,
isValidating,
error,
refetch,
} = useGet<Notification[]>("/notifications/team");
return (
<BasePageWithStates
page={t("pages.notifications.fallback.title")}
bullets={
t("pages.notifications.fallback.checks", {
returnObjects: true,
}) as string[]
t("pages.notifications.fallback.checks", { returnObjects: true }) as string[]
}
loading={false}
error={false}
items={[]}
loading={isLoading || isValidating}
error={!!error}
items={notifications ?? []}
actionButtonText={t("pages.notifications.fallback.actionButton")}
actionLink="/notifications/create"
>
Notifications
<NotificationsTable
notifications={notifications ?? []}
setSelectedChannel={setSelectedChannel}
/>
</BasePageWithStates>
);
};
export default NotificationsPage;