refactor: streamline conditional rendering for service creation dropdown in EnvironmentPage, improving code readability and maintainability

This commit is contained in:
Mauricio Siu
2025-09-05 00:56:37 -06:00
parent 87a41ca710
commit a09cd06eea
@@ -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>