mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
26 lines
941 B
TypeScript
26 lines
941 B
TypeScript
import { NEXT_PUBLIC_TESTNET } from '@/lib/env';
|
|
import type { ButtonProps } from '@session/ui/ui/button';
|
|
import { WalletInteractionButton } from '@session/wallet/components/WalletInteractionButton';
|
|
import { useTranslations } from 'next-intl';
|
|
import { forwardRef } from 'react';
|
|
import { arbitrum, arbitrumSepolia } from 'viem/chains';
|
|
|
|
const WalletInteractionButtonWithLocales = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
(props, ref) => {
|
|
const dict = useTranslations('wallet.walletInteractionButton');
|
|
return (
|
|
<WalletInteractionButton
|
|
{...props}
|
|
ref={ref}
|
|
disconnectedChildren={dict('connectWallet')}
|
|
incorrectChainChildren={dict('switchNetwork')}
|
|
targetChainId={(NEXT_PUBLIC_TESTNET ? arbitrumSepolia : arbitrum).id}
|
|
/>
|
|
);
|
|
}
|
|
);
|
|
|
|
WalletInteractionButtonWithLocales.displayName = 'WalletInteractionButtonWithLocales';
|
|
|
|
export { WalletInteractionButtonWithLocales };
|