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,65 @@
|
||||
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 GoalIcon from "~/components/ui/icons/onboardings/GoalIcon";
|
||||
import GoalIconFilled from "~/components/ui/icons/onboardings/GoalIconFilled";
|
||||
import JourneyIcon from "~/components/ui/icons/onboardings/JourneyIcon";
|
||||
import JourneyIconFilled from "~/components/ui/icons/onboardings/JourneyIconFilled";
|
||||
import SidebarIconsLayout from "~/components/ui/layouts/SidebarIconsLayout";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService";
|
||||
import { adminPath } from "~/utils/app/CanonicalUrlUtils";
|
||||
|
||||
type LoaderData = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
const { t } = await getTranslations(request);
|
||||
await verifyUserHasPermission(request, "admin.onboarding.view");
|
||||
const data: LoaderData = {
|
||||
title: `${t("onboarding.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("shared.overview"),
|
||||
href: adminPath("onboarding", { mode: "host-aware" }),
|
||||
exact: true,
|
||||
icon: <IncreaseIcon className="h-5 w-5" />,
|
||||
iconSelected: <IncreaseIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("app.sidebar.onboardings"),
|
||||
href: adminPath("onboarding/onboardings", { mode: "host-aware" }),
|
||||
icon: <GoalIcon className="h-5 w-5" />,
|
||||
iconSelected: <GoalIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("app.sidebar.sessions"),
|
||||
href: adminPath("onboarding/sessions", { mode: "host-aware" }),
|
||||
icon: <JourneyIcon className="h-5 w-5" />,
|
||||
iconSelected: <JourneyIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Outlet />
|
||||
</SidebarIconsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export function ErrorBoundary() {
|
||||
return <ServerError />;
|
||||
}
|
||||
Reference in new issue
Block a user