This commit is contained in:
freedakgmail
2025-11-23 18:03:04 +08:00
parent 9cdd751a56
commit e44dd0bd95
489 changed files with 264491 additions and 4157 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import { format } from "date-fns"
import { useSession } from "next-auth/react"
import { useSearchParams } from "next/navigation"
import { CollaboratorDialog } from "@/components/tree/collaborator-dialog"
import { permissions } from "@/lib/permissions"
interface ActivityLog {
id: string
@@ -191,7 +192,7 @@ export default function DashboardPage() {
{session && currentTree?.ownerId === session.user?.id && (
<CollaboratorDialog />
)}
{(currentTree?.currentUserRole === "OWNER" || currentTree?.currentUserRole === "EDITOR") && (
{permissions.canCreate(currentTree?.currentUserRole) && (
<Link href="/members/new">
<Button className="gap-2 bg-primary text-primary-foreground hover:bg-primary/90">
<UserPlus className="h-4 w-4" />