diff --git a/web/src/components/DisputeView/DisputeInfo/DisputeInfoCard.tsx b/web/src/components/DisputeView/DisputeInfo/DisputeInfoCard.tsx index 2e2e0079d..2985fa3f2 100644 --- a/web/src/components/DisputeView/DisputeInfo/DisputeInfoCard.tsx +++ b/web/src/components/DisputeView/DisputeInfo/DisputeInfoCard.tsx @@ -1,11 +1,8 @@ import React, { useMemo } from "react"; import styled, { css } from "styled-components"; -import { Link } from "react-router-dom"; - import LawBalanceIcon from "svgs/icons/law-balance.svg"; -import { useScrollTop } from "hooks/useScrollTop"; import { useCourtTree } from "hooks/queries/useCourtTree"; import { landscapeStyle } from "styles/landscapeStyle"; @@ -67,19 +64,6 @@ const StyledField = styled(Field)` } `; -const StyledLink = styled(Link)` - width: 100%; - :hover { - label { - &.value { - cursor: pointer; - color: ${({ theme }) => theme.primaryBlue}; - text-decoration: underline; - } - } - } -`; - type IDisputeInfoCard = { fieldItems: FieldItem[] } & IDisputeInfo; const DisputeInfoCard: React.FC = ({ @@ -91,7 +75,6 @@ const DisputeInfoCard: React.FC = ({ disputeID, round, }) => { - const scrollTop = useScrollTop(); const { data } = useCourtTree(); const courtPath = getCourtsPath(data?.court, courtId); const items = useMemo( @@ -104,9 +87,13 @@ const DisputeInfoCard: React.FC = ({ {court && courtId && isOverview && ( - scrollTop()}> - - + )} diff --git a/web/src/components/Field.tsx b/web/src/components/Field.tsx index 8f785e221..d3abd80e9 100644 --- a/web/src/components/Field.tsx +++ b/web/src/components/Field.tsx @@ -1,9 +1,10 @@ import React from "react"; import styled, { css } from "styled-components"; +import { landscapeStyle } from "styles/landscapeStyle"; import { Link } from "react-router-dom"; -import { landscapeStyle } from "styles/landscapeStyle"; +import { useScrollTop } from "hooks/useScrollTop"; const FieldContainer = styled.div` display: flex; @@ -61,6 +62,8 @@ const LinkContainer = styled.div``; const StyledLink = styled(Link)` color: ${({ theme }) => theme.primaryBlue}; + text-wrap: auto; + justify-content: end; `; type FieldContainerProps = { @@ -93,6 +96,8 @@ const Field: React.FC = ({ isJurorBalance, className, }) => { + const scrollTop = useScrollTop(); + return ( @@ -103,6 +108,7 @@ const Field: React.FC = ({ to={link} onClick={(event) => { event.stopPropagation(); + scrollTop(); }} > {value}