mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
23 lines
523 B
TypeScript
23 lines
523 B
TypeScript
import { chakra } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import config from 'configs/app';
|
|
import { Alert } from 'toolkit/chakra/alert';
|
|
|
|
interface Props {
|
|
isLoading?: boolean;
|
|
className?: string;
|
|
}
|
|
|
|
const TestnetWarning = ({ isLoading, className }: Props) => {
|
|
if (!config.chain.isTestnet) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Alert status="warning" loading={ isLoading } className={ className }>This is a testnet transaction only</Alert>
|
|
);
|
|
};
|
|
|
|
export default React.memo(chakra(TestnetWarning));
|