mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-13 15:35:17 +00:00
refactor: streamline conditional rendering for service creation dropdown in EnvironmentPage, improving code readability and maintainability
This commit is contained in:
@@ -786,8 +786,7 @@ const EnvironmentPage = (
|
|||||||
<ProjectEnvironment projectId={projectId}>
|
<ProjectEnvironment projectId={projectId}>
|
||||||
<Button variant="outline">Project Environment</Button>
|
<Button variant="outline">Project Environment</Button>
|
||||||
</ProjectEnvironment>
|
</ProjectEnvironment>
|
||||||
{auth?.role === "owner" ||
|
{(auth?.role === "owner" || auth?.canCreateServices) && (
|
||||||
(auth?.canCreateServices && (
|
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button>
|
<Button>
|
||||||
@@ -822,7 +821,7 @@ const EnvironmentPage = (
|
|||||||
/>
|
/>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
))}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user