File tree Expand file tree Collapse file tree 5 files changed +449
-332
lines changed
Expand file tree Collapse file tree 5 files changed +449
-332
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export const HandleProject = ({ projectId }: Props) => {
118118 </ DialogTrigger >
119119 < DialogContent className = "sm:m:max-w-lg " >
120120 < DialogHeader >
121- < DialogTitle > Add a project</ DialogTitle >
121+ < DialogTitle > { projectId ? "Update" : " Add a" } project</ DialogTitle >
122122 < DialogDescription > The home of something big!</ DialogDescription >
123123 </ DialogHeader >
124124 { isError && < AlertBlock type = "error" > { error ?. message } </ AlertBlock > }
Original file line number Diff line number Diff line change @@ -87,9 +87,12 @@ export const ShowProjects = () => {
8787 Create and manage your projects
8888 </ CardDescription >
8989 </ CardHeader >
90- < div className = "" >
91- < HandleProject />
92- </ div >
90+
91+ { ( auth ?. rol === "admin" || user ?. canCreateProjects ) && (
92+ < div className = "" >
93+ < HandleProject />
94+ </ div >
95+ ) }
9396 </ div >
9497
9598 < CardContent className = "space-y-2 py-8 border-t gap-4 flex flex-col min-h-[60vh]" >
You can’t perform that action at this time.
0 commit comments