mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
* migrate to biome * cleanup * fix * use tsx * script tweaks * fix test runs * path tweaks
20 lines
402 B
TypeScript
20 lines
402 B
TypeScript
import { $txHash } from '@/features/Web3/stores'
|
|
import { useStore } from '@nanostores/react'
|
|
|
|
export function ExplorerLink({
|
|
url,
|
|
children
|
|
}: {
|
|
url: string | undefined
|
|
children: React.ReactNode
|
|
}) {
|
|
const txHash = useStore($txHash)
|
|
const explorerLink = `${url}/tx/${txHash}`
|
|
|
|
return (
|
|
<a href={explorerLink} target="_blank" rel="noopener noreferrer">
|
|
{children}
|
|
</a>
|
|
)
|
|
}
|