mirror of
https://github.com/andwati/dokploy.git
synced 2026-12-04 16:48:46 +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}>
|
||||
<Button variant="outline">Project Environment</Button>
|
||||
</ProjectEnvironment>
|
||||
{auth?.role === "owner" ||
|
||||
(auth?.canCreateServices && (
|
||||
{(auth?.role === "owner" || auth?.canCreateServices) && (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button>
|
||||
@@ -822,7 +821,7 @@ const EnvironmentPage = (
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
))}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user