Skip to content

Commit

Permalink
re-placement of testnet badge
Browse files Browse the repository at this point in the history
  • Loading branch information
supertong committed Dec 15, 2024
1 parent 7856d71 commit 5e34fdf
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/app/components/NetworkBadge/NetworkBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
import Image from "next/image";
import { twJoin } from "tailwind-merge";

import { useBTCWallet } from "@/app/context/wallet/BTCWalletProvider";
import { network } from "@/config/network.config";
import { Network } from "@/utils/wallet/btc_wallet_provider";

import testnetIcon from "./testnet-icon.png";

export const NetworkBadge = () => {
const { connected } = useBTCWallet();

return (
<div
className={twJoin(
`absolute left-2`,
connected ? "top-40 md:top-24 lg:top-32" : "top-24 md:top-24 lg:top-32",
)}
>
<div className={twJoin(`absolute left-2 top-7`)}>
{[Network.SIGNET, Network.TESTNET].includes(network) && (
<>
<Image src={testnetIcon} alt="Testnet" className="w-[10rem]" />
<Image
src={testnetIcon}
alt="Testnet"
className="w-[4rem] md:w-[7rem]"
/>
{/*
currently the text is absolutely positioned
since the image has a shadow
*/}
<p className="absolute left-4 top-[4rem] text-sm dark:text-neutral-content">
<p className="absolute left-1 top-[1rem] md:top-[2rem] text-sm text-secondary-contrast">
Testnet
</p>
</>
Expand Down

0 comments on commit 5e34fdf

Please sign in to comment.