Skip to content

Commit

Permalink
chore: Remove leftnav from manage-permissions (#2595)
Browse files Browse the repository at this point in the history
Remove leftnav from manage-permissions
  • Loading branch information
dsamojlenko authored Aug 25, 2023
1 parent 5437d4d commit 20c3a05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pages/admin/accounts/[id]/manage-forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ ManageForms.getLayout = (page: ReactElement) => {
context="admin"
leftColumnContent={<BackToAccounts id={page.props.formUser.id} />}
>
<TemplateStoreProvider {...{ locale: page.props.locale }}>{page}</TemplateStoreProvider>
{page}
</TwoColumnLayout>
);
};
Expand Down
10 changes: 6 additions & 4 deletions pages/admin/accounts/[id]/manage-permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import { requireAuthentication } from "@lib/auth";
import { checkPrivileges, getAllPrivileges } from "@lib/privileges";
import { logMessage } from "@lib/logger";
import { getUser } from "@lib/users";
import AdminNavLayout from "@components/globals/layouts/AdminNavLayout";
import { Button, Alert } from "@components/globals";
import { BackLink } from "@components/admin/LeftNav/BackLink";
import { PermissionToggle } from "@components/admin/Users/PermissionToggle";
import { LinkButton } from "@components/globals";
import { TwoColumnLayout } from "@components/globals/layouts";
import { TemplateStoreProvider } from "@components/form-builder/store";

type PrivilegeList = Omit<Privilege, "permissions">[];
interface User {
Expand Down Expand Up @@ -229,12 +230,13 @@ const BackToAccounts = ({ id }: { id: string }) => {

ManagePermissions.getLayout = (page: ReactElement) => {
return (
<AdminNavLayout
<TwoColumnLayout
user={page.props.user}
backLink={<BackToAccounts id={page.props.formUser.id} />}
context="admin"
leftColumnContent={<BackToAccounts id={page.props.formUser.id} />}
>
{page}
</AdminNavLayout>
</TwoColumnLayout>
);
};

Expand Down

0 comments on commit 20c3a05

Please sign in to comment.