From 6e29301f6ade9938da3d243f36fe85633cc20d51 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Tue, 21 Mar 2023 18:44:27 +0000 Subject: [PATCH] feat/ permananet notification --- src/components/FooterInfo.tsx | 6 +++++ src/components/PublicNotification.tsx | 37 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/components/PublicNotification.tsx diff --git a/src/components/FooterInfo.tsx b/src/components/FooterInfo.tsx index 18640a0b4..1796596fc 100644 --- a/src/components/FooterInfo.tsx +++ b/src/components/FooterInfo.tsx @@ -13,6 +13,7 @@ import { FaDiscord as Discord } from 'react-icons/fa'; import { ChainContext } from '../contexts/ChainContext'; import BoxWrap from './wraps/BoxWrap'; import NetworkSelector from './selectors/NetworkSelector'; +import PublicNotification from './PublicNotification'; const IconSize = '1.15rem'; const IconGap = 'small'; @@ -25,7 +26,11 @@ const FooterInfo = () => { const handleExternal = (destination: string) => {}; return ( + <> + + + App version: v{process.env.REACT_APP_VERSION} @@ -108,6 +113,7 @@ const FooterInfo = () => { + ); }; diff --git a/src/components/PublicNotification.tsx b/src/components/PublicNotification.tsx new file mode 100644 index 000000000..62629bfcc --- /dev/null +++ b/src/components/PublicNotification.tsx @@ -0,0 +1,37 @@ +import { useContext } from 'react'; +import { Box, ResponsiveContext, Text } from 'grommet'; +import { FiAlertCircle, FiAlertTriangle } from 'react-icons/fi'; +import useChainId from '../hooks/useChainId'; + +type PublicNotificationProps = { + children?: any; +}; + +const PublicNotification = ({ children }: PublicNotificationProps) => { + const chainId = useChainId(); + return ( + <> + {chainId === 1 ? ( + + + + + + + Full functionality is temporarily resticted on Ethereum mainnet. + + + + ) : null} + + ); +}; + +export default PublicNotification;