Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,74 @@
|
||||
import { LoaderFunctionArgs, MetaFunction } from "react-router";
|
||||
import { Outlet } from "react-router";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ServerError from "~/components/ui/errors/ServerError";
|
||||
import IncreaseIcon from "~/components/ui/icons/crm/IncreaseIcon";
|
||||
import IncreaseIconFilled from "~/components/ui/icons/crm/IncreaseIconFilled";
|
||||
import AlarmIcon from "~/components/ui/icons/notifications/AlarmIcon";
|
||||
import AlarmIconFilled from "~/components/ui/icons/notifications/AlarmIconFilled";
|
||||
import ChannelIcon from "~/components/ui/icons/notifications/ChannelIcon";
|
||||
import ChannelIconFilled from "~/components/ui/icons/notifications/ChannelIconFilled";
|
||||
import EarIcon from "~/components/ui/icons/notifications/EarIcon";
|
||||
import EarIconFilled from "~/components/ui/icons/notifications/EarIconFilled";
|
||||
import SidebarIconsLayout from "~/components/ui/layouts/SidebarIconsLayout";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { adminPath } from "~/utils/app/CanonicalUrlUtils";
|
||||
import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService";
|
||||
|
||||
type LoaderData = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
|
||||
const { t } = await getTranslations(request);
|
||||
await verifyUserHasPermission(request, "admin.notifications.view");
|
||||
const data: LoaderData = {
|
||||
title: `${t("notifications.title")} | ${process.env.APP_NAME}`,
|
||||
};
|
||||
return data;
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: data?.title }];
|
||||
|
||||
export default () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<SidebarIconsLayout
|
||||
label={{ align: "right" }}
|
||||
items={[
|
||||
{
|
||||
name: t("notifications.admin.nav.overview"),
|
||||
href: adminPath("notifications", { mode: "host-aware" }),
|
||||
exact: true,
|
||||
icon: <IncreaseIcon className="h-5 w-5" />,
|
||||
iconSelected: <IncreaseIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("notifications.admin.nav.subscribers"),
|
||||
href: adminPath("notifications/subscribers", { mode: "host-aware" }),
|
||||
icon: <EarIcon className="h-5 w-5" />,
|
||||
iconSelected: <EarIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("notifications.admin.nav.messages"),
|
||||
href: adminPath("notifications/messages", { mode: "host-aware" }),
|
||||
icon: <AlarmIcon className="h-5 w-5" />,
|
||||
iconSelected: <AlarmIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("notifications.admin.nav.channels"),
|
||||
href: adminPath("notifications/channels", { mode: "host-aware" }),
|
||||
icon: <ChannelIcon className="h-5 w-5" />,
|
||||
iconSelected: <ChannelIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Outlet />
|
||||
</SidebarIconsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export function ErrorBoundary() {
|
||||
return <ServerError />;
|
||||
}
|
||||
Reference in new issue
Block a user