fix(dashboard): update project environment link to use default production environment

- Modified the project environment link to reference the default production environment instead of the first environment in the list, improving accuracy in navigation.
This commit is contained in:
Mauricio Siu
2025-12-13 00:32:26 -06:00
parent a32e7e0041
commit 092afbe1fa

View File

@@ -286,13 +286,17 @@ export const ShowProjects = () => {
)
.some(Boolean);
const productionEnvironment = project?.environments.find(
(env) => env.isDefault,
);
return (
<div
key={project.projectId}
className="w-full lg:max-w-md"
>
<Link
href={`/dashboard/project/${project.projectId}/environment/${project?.environments?.[0]?.environmentId}`}
href={`/dashboard/project/${project.projectId}/environment/${productionEnvironment?.environmentId}`}
>
<Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
{haveServicesWithDomains ? (