This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { getSessionUser, canMutate } from "@/lib/session";
|
||||
import { getSessionUser, canMutate, isCustomerOwner } from "@/lib/session";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { redirect } from "next/navigation";
|
||||
import { getOrgMembers } from "@/lib/team";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { BackLink } from "@/components/ui/back-link";
|
||||
import { TeamList } from "@/components/team/team-list";
|
||||
import { InviteForm } from "@/components/team/invite-form";
|
||||
import Link from "next/link";
|
||||
|
||||
/**
|
||||
* /team — manage org members.
|
||||
@@ -30,12 +30,7 @@ export default async function TeamPage() {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-8 animate-in">
|
||||
<Link
|
||||
href="/dashboard"
|
||||
className="inline-flex items-center gap-1.5 mb-4 text-xs font-medium text-text-muted hover:text-text-primary transition-colors"
|
||||
>
|
||||
<span>←</span> {tDashboard("title")}
|
||||
</Link>
|
||||
<BackLink href="/dashboard" label={tDashboard("title")} />
|
||||
<h1 className="font-display text-2xl font-semibold accent-rule mb-2">
|
||||
{t("title")}
|
||||
</h1>
|
||||
@@ -58,7 +53,11 @@ export default async function TeamPage() {
|
||||
({members.length})
|
||||
</span>
|
||||
</h2>
|
||||
<TeamList initialMembers={members} currentUserId={user.id} />
|
||||
<TeamList
|
||||
initialMembers={members}
|
||||
currentUserId={user.id}
|
||||
canEditRoles={isCustomerOwner(user)}
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user