1
1
import React , { useMemo } from "react" ;
2
2
import styled , { css } from "styled-components" ;
3
3
4
- import { Link } from "react-router-dom" ;
5
-
6
4
import LawBalanceIcon from "svgs/icons/law-balance.svg" ;
7
5
8
- import { useScrollTop } from "hooks/useScrollTop" ;
9
6
import { useCourtTree } from "hooks/queries/useCourtTree" ;
10
7
11
8
import { landscapeStyle } from "styles/landscapeStyle" ;
@@ -67,19 +64,6 @@ const StyledField = styled(Field)`
67
64
}
68
65
` ;
69
66
70
- const StyledLink = styled ( Link ) `
71
- width: 100%;
72
- :hover {
73
- label {
74
- &.value {
75
- cursor: pointer;
76
- color: ${ ( { theme } ) => theme . primaryBlue } ;
77
- text-decoration: underline;
78
- }
79
- }
80
- }
81
- ` ;
82
-
83
67
type IDisputeInfoCard = { fieldItems : FieldItem [ ] } & IDisputeInfo ;
84
68
85
69
const DisputeInfoCard : React . FC < IDisputeInfoCard > = ( {
@@ -91,7 +75,6 @@ const DisputeInfoCard: React.FC<IDisputeInfoCard> = ({
91
75
disputeID,
92
76
round,
93
77
} ) => {
94
- const scrollTop = useScrollTop ( ) ;
95
78
const { data } = useCourtTree ( ) ;
96
79
const courtPath = getCourtsPath ( data ?. court , courtId ) ;
97
80
const items = useMemo (
@@ -104,9 +87,13 @@ const DisputeInfoCard: React.FC<IDisputeInfoCard> = ({
104
87
< Container >
105
88
{ court && courtId && isOverview && (
106
89
< CourtBranchFieldContainer >
107
- < StyledLink to = { `/courts/${ courtId } ` } onClick = { ( ) => scrollTop ( ) } >
108
- < StyledField icon = { LawBalanceIcon } name = "Court Branch" value = { courtBranchValue } { ...{ isOverview } } />
109
- </ StyledLink >
90
+ < StyledField
91
+ link = { `/courts/${ courtId } ` }
92
+ icon = { LawBalanceIcon }
93
+ name = "Court Branch"
94
+ value = { courtBranchValue }
95
+ { ...{ isOverview } }
96
+ />
110
97
</ CourtBranchFieldContainer >
111
98
) }
112
99
< RestOfFieldsContainer { ...{ isOverview } } >
0 commit comments