Skip to content

Commit d722cb2

Browse files
authored
Merge pull request #1631 from kleros/fix/link-behaviour-in-dispute-card
fix(web): link-behaviour-in-dispute-card
2 parents ff2c67e + 193f09d commit d722cb2

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

web/src/components/Field.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ const FieldContainer = styled.div<FieldContainerProps>`
2323
width: 14px;
2424
}
2525
26-
.link {
27-
color: ${({ theme }) => theme.primaryBlue};
28-
:hover {
29-
cursor: pointer;
30-
}
31-
}
3226
${({ isList }) =>
3327
isList &&
3428
css`
@@ -62,6 +56,12 @@ const FieldContainer = styled.div<FieldContainerProps>`
6256
`};
6357
`;
6458

59+
const LinkContainer = styled.div``;
60+
61+
const StyledLink = styled(Link)`
62+
color: ${({ theme }) => theme.primaryBlue};
63+
`;
64+
6565
type FieldContainerProps = {
6666
width?: string;
6767
isList?: boolean;
@@ -97,15 +97,16 @@ const Field: React.FC<IField> = ({
9797
<Icon />
9898
{(!displayAsList || isOverview || isJurorBalance) && <label>{name}:</label>}
9999
{link ? (
100-
<Link
101-
className="link value"
102-
to={link}
103-
onClick={(event) => {
104-
event.stopPropagation();
105-
}}
106-
>
107-
{value}
108-
</Link>
100+
<LinkContainer className="value">
101+
<StyledLink
102+
to={link}
103+
onClick={(event) => {
104+
event.stopPropagation();
105+
}}
106+
>
107+
{value}
108+
</StyledLink>
109+
</LinkContainer>
109110
) : (
110111
<label className="value">{value}</label>
111112
)}

0 commit comments

Comments
 (0)