Skip to content

Commit

Permalink
style(btc-link): change the code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Daryl-L committed Aug 8, 2024
1 parent 603e800 commit 69b7876
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,19 @@ export const BTCExplorerLink = forwardRef<HTMLAnchorElement, BTCExplorerLinkProp
ref,
) => {
const { locale } = useParams<{ locale?: string }>()
const { data: identity } = useQuery({
let { data: identity } = useQuery({
queryKey: ['btc-testnet-identity', id, address],
queryFn: () => getBtcChainIdentify(id!),
enabled: !IS_MAINNET && !!id,
})
identity = identity ?? 'testnet'

return (
<Link
lng={lng ?? (locale as 'en' | 'zh')}
ref={ref}
{...props}
to={`${config.BITCOIN_EXPLORER}${IS_MAINNET ? '' : `/${identity ?? 'testnet'}`}${path}/${address ?? id}${
to={`${config.BITCOIN_EXPLORER}${IS_MAINNET ? '' : `/${identity}`}${path}/${address ?? id}${
anchor ? `#${anchor}` : ''
}`}
/>
Expand Down

0 comments on commit 69b7876

Please sign in to comment.