mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix reorg badge and issue url
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
|
||||
import config from 'configs/app';
|
||||
|
||||
export default function useIssueUrl(backendVersion: string | undefined) {
|
||||
const [ isLoading, setIsLoading ] = React.useState(true);
|
||||
const router = useRouter();
|
||||
|
||||
React.useEffect(() => {
|
||||
setIsLoading(false);
|
||||
@@ -23,6 +25,8 @@ export default function useIssueUrl(backendVersion: string | undefined) {
|
||||
'additional-information': `**User Agent:** ${ window.navigator.userAgent }`,
|
||||
});
|
||||
return `https://github.com/blockscout/blockscout/issues/new/?${ searchParams.toString() }`;
|
||||
}, [ backendVersion, isLoading ]);
|
||||
// we need to update link whenever page url changes
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [ backendVersion, isLoading, router.asPath ]);
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ const SearchBarSuggestBlock = ({ data, isMobile, searchTerm }: Props) => {
|
||||
{ icon }
|
||||
{ blockNumber }
|
||||
</Flex>
|
||||
<Flex columnGap={ 3 } minW={ 0 }>
|
||||
<Flex columnGap={ 3 } minW={ 0 } alignItems="center">
|
||||
{ data.block_type === 'reorg' && <Tag flexShrink={ 0 }>Reorg</Tag> }
|
||||
{ hash }
|
||||
</Flex>
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user