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
@@ -286,13 +286,17 @@ export const ShowProjects = () => {
) )
.some(Boolean); .some(Boolean);
const productionEnvironment = project?.environments.find(
(env) => env.isDefault,
);
return ( return (
<div <div
key={project.projectId} key={project.projectId}
className="w-full lg:max-w-md" className="w-full lg:max-w-md"
> >
<Link <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"> <Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
{haveServicesWithDomains ? ( {haveServicesWithDomains ? (