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,31 @@
|
||||
/**
|
||||
* Admin parent route for the email-sequence editor + dashboard
|
||||
* (Phase 05 Task #80, deferred follow-up).
|
||||
*
|
||||
* Renders an `<Outlet />` for the list / detail / stats child routes.
|
||||
* Permission gating happens here so all child loaders inherit the
|
||||
* auth check.
|
||||
*/
|
||||
import { LoaderFunctionArgs, MetaFunction, Outlet } from "react-router";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService";
|
||||
|
||||
type LoaderData = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
await verifyUserHasPermission(request, "admin.marketing.leads.view");
|
||||
const { t } = await getTranslations(request);
|
||||
const title = (t("admin.emailSequences.title") as string) || "Email Sequences";
|
||||
const data: LoaderData = {
|
||||
title: `${title} | ${process.env.APP_NAME}`,
|
||||
};
|
||||
return data;
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: data?.title }];
|
||||
|
||||
export default function EmailSequencesLayout() {
|
||||
return <Outlet />;
|
||||
}
|
||||
Reference in new issue
Block a user