prettier fix
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
import { isSuperAdmin } from '@kit/admin';
|
||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
|
||||
import { isCompanyAdmin } from '../server/utils/is-company-admin';
|
||||
import { isSuperAdmin } from '@kit/admin'
|
||||
|
||||
type LayoutOrPageComponent<Params> = React.ComponentType<Params>;
|
||||
|
||||
@@ -18,9 +19,10 @@ export function CompanyGuard<Params extends object>(
|
||||
//@ts-ignore
|
||||
const { account } = await params.params;
|
||||
const client = getSupabaseServerClient();
|
||||
const [isUserSuperAdmin, isUserCompanyAdmin] = await Promise.all(
|
||||
[isSuperAdmin(client), isCompanyAdmin(client, account)]
|
||||
);
|
||||
const [isUserSuperAdmin, isUserCompanyAdmin] = await Promise.all([
|
||||
isSuperAdmin(client),
|
||||
isCompanyAdmin(client, account),
|
||||
]);
|
||||
|
||||
if (isUserSuperAdmin || isUserCompanyAdmin) {
|
||||
return <Component {...params} />;
|
||||
|
||||
@@ -66,7 +66,10 @@ export function InviteMembersDialogContainer({
|
||||
<Dialog open={isOpen} onOpenChange={setIsOpen} modal>
|
||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||
|
||||
<DialogContent className="max-w-[800px]" onInteractOutside={(e) => e.preventDefault()}>
|
||||
<DialogContent
|
||||
className="max-w-[800px]"
|
||||
onInteractOutside={(e) => e.preventDefault()}
|
||||
>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
<Trans i18nKey={'teams:inviteMembersHeading'} />
|
||||
@@ -142,7 +145,8 @@ function InviteMembersForm({
|
||||
{fieldArray.fields.map((field, index) => {
|
||||
const isFirst = index === 0;
|
||||
|
||||
const personalCodeInputName = `invitations.${index}.personal_code` as const;
|
||||
const personalCodeInputName =
|
||||
`invitations.${index}.personal_code` as const;
|
||||
const emailInputName = `invitations.${index}.email` as const;
|
||||
const roleInputName = `invitations.${index}.role` as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user