@@ -31,10 +31,9 @@ import type { AddressQuery } from './utils/useAddressQuery';
31
31
32
32
interface Props {
33
33
addressQuery : AddressQuery ;
34
- scrollRef ?: React . RefObject < HTMLDivElement > ;
35
34
}
36
35
37
- const AddressDetails = ( { addressQuery, scrollRef } : Props ) => {
36
+ const AddressDetails = ( { addressQuery } : Props ) => {
38
37
const router = useRouter ( ) ;
39
38
40
39
const addressHash = getQueryParamString ( router . query . hash ) ;
@@ -44,13 +43,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
44
43
addressQuery,
45
44
} ) ;
46
45
47
- const handleCounterItemClick = React . useCallback ( ( ) => {
48
- window . setTimeout ( ( ) => {
49
- // cannot do scroll instantly, have to wait a little
50
- scrollRef ?. current ?. scrollIntoView ( { behavior : 'smooth' } ) ;
51
- } , 500 ) ;
52
- } , [ scrollRef ] ) ;
53
-
54
46
const error404Data = React . useMemo ( ( ) => ( {
55
47
hash : addressHash || '' ,
56
48
is_contract : false ,
@@ -184,7 +176,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
184
176
Tokens
185
177
</ DetailsInfoItem . Label >
186
178
< DetailsInfoItem . Value py = { addressQuery . data ? 0 : undefined } >
187
- { addressQuery . data ? < TokenSelect onClick = { handleCounterItemClick } /> : < Box > 0</ Box > }
179
+ { addressQuery . data ? < TokenSelect /> : < Box > 0</ Box > }
188
180
</ DetailsInfoItem . Value >
189
181
</ >
190
182
) }
@@ -215,7 +207,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
215
207
prop = "transactions_count"
216
208
query = { countersQuery }
217
209
address = { data . hash }
218
- onClick = { handleCounterItemClick }
219
210
isAddressQueryLoading = { addressQuery . isPlaceholderData }
220
211
isDegradedData = { addressQuery . isDegradedData }
221
212
/>
@@ -237,7 +228,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
237
228
prop = "token_transfers_count"
238
229
query = { countersQuery }
239
230
address = { data . hash }
240
- onClick = { handleCounterItemClick }
241
231
isAddressQueryLoading = { addressQuery . isPlaceholderData }
242
232
isDegradedData = { addressQuery . isDegradedData }
243
233
/>
@@ -261,7 +251,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
261
251
prop = "gas_usage_count"
262
252
query = { countersQuery }
263
253
address = { data . hash }
264
- onClick = { handleCounterItemClick }
265
254
isAddressQueryLoading = { addressQuery . isPlaceholderData }
266
255
isDegradedData = { addressQuery . isDegradedData }
267
256
/>
@@ -291,7 +280,6 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
291
280
prop = "validations_count"
292
281
query = { countersQuery }
293
282
address = { data . hash }
294
- onClick = { handleCounterItemClick }
295
283
isAddressQueryLoading = { addressQuery . isPlaceholderData }
296
284
isDegradedData = { addressQuery . isDegradedData }
297
285
/>
0 commit comments