Skip to content

Commit 0091251

Browse files
nick-skriabinhlomzik
authored andcommitted
fix: DIA-2120: Clicking on project item from home page is not always responsive (#7313)
Co-authored-by: Andrew <[email protected]>
1 parent 79f4240 commit 0091251

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/apps/labelstudio/src/pages/Home/HomePage.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useState } from "react";
99
import { CreateProject } from "../CreateProject/CreateProject";
1010
import { InviteLink } from "../Organization/PeoplePage/InviteLink";
1111
import { Heading, Sub } from "@humansignal/typography";
12+
import { Link } from "react-router-dom";
1213

1314
const PROJECTS_TO_SHOW = 10;
1415

@@ -191,7 +192,11 @@ function ProjectSimpleCard({
191192
const color = project.color && project.color !== white ? project.color : "#E1DED5";
192193

193194
return (
194-
<a href={`/projects/${project.id}`} className="block even:bg-lsNeutralSurface rounded-sm overflow-hidden">
195+
<Link
196+
to={`/projects/${project.id}`}
197+
className="block even:bg-neutral-surface rounded-sm overflow-hidden"
198+
data-external
199+
>
195200
<div
196201
className="grid grid-cols-[minmax(0,1fr)_150px] p-2 py-3 items-center border-l-[3px]"
197202
style={{ borderLeftColor: color }}
@@ -206,6 +211,6 @@ function ProjectSimpleCard({
206211
<div className="bg-lsPositiveSurfaceHover h-full" style={{ maxWidth: `${progress}%` }} />
207212
</div>
208213
</div>
209-
</a>
214+
</Link>
210215
);
211216
}

0 commit comments

Comments
 (0)