From 53245bf57e7db8f786f3f4d77a9a64dab3d8f2ef Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Mon, 27 Nov 2023 15:09:50 +0000 Subject: [PATCH] notice of closure --- package.json | 2 +- src/components/FooterInfo.tsx | 4 +- src/components/PublicNotificationSunset.tsx | 66 +++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 src/components/PublicNotificationSunset.tsx diff --git a/package.json b/package.json index 5a9096d29..44878d568 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-v2", - "version": "2.5.41", + "version": "2.5.42", "private": true, "dependencies": { "@ethersproject/providers": "^5.6.8", diff --git a/src/components/FooterInfo.tsx b/src/components/FooterInfo.tsx index 5b6ea94be..ac5085c46 100644 --- a/src/components/FooterInfo.tsx +++ b/src/components/FooterInfo.tsx @@ -15,6 +15,7 @@ import BoxWrap from './wraps/BoxWrap'; import NetworkSelector from './selectors/NetworkSelector'; import PublicNotification from './PublicNotification'; import TermsModal from './TermsModal'; +import PublicNotificationSunset from './PublicNotificationSunset'; const IconSize = '1.15rem'; const IconGap = 'small'; @@ -30,7 +31,8 @@ const FooterInfo = () => { <> - {' '} + + diff --git a/src/components/PublicNotificationSunset.tsx b/src/components/PublicNotificationSunset.tsx new file mode 100644 index 000000000..610da2364 --- /dev/null +++ b/src/components/PublicNotificationSunset.tsx @@ -0,0 +1,66 @@ +import { useState } from 'react'; +import { Box, Text, Button } from 'grommet'; +import { FiAlertTriangle } from 'react-icons/fi'; +import useChainId from '../hooks/useChainId'; +import TermsModal from './TermsModal'; +import useUpgradeTokens from '../hooks/actionHooks/useUpgradeTokens'; + +type PublicNotificationProps = { + children?: any; +}; + +const PublicNotificationSunset = ({ children }: PublicNotificationProps) => { + const chainId = useChainId(); + const { hasUpgradeable, isUpgrading, upgradeAllStrategies } = useUpgradeTokens(); + const [showTerms, setShowTerms] = useState(false); + + const showTermsModal = () => { + setShowTerms(!showTerms); + }; + + const confirmUpgrade = (hasAcceptedTerms: boolean) => { + if (!hasAcceptedTerms) { + return; + } + upgradeAllStrategies(hasAcceptedTerms); + }; + + return ( + <> + + + + + {/* + + */} + + Important Notice:{' '} + + Yield Protocol Shutting Down + + + + + As of 31st of December 2023, the Yield Protocol will be officially discontinued. + + + Contact us on our {" "} + + discord channel + {" "} + with any support issues until 31 January 2024. + + + + showTermsModal()} onConfirm={confirmUpgrade} /> + + + ); +}; + +export default PublicNotificationSunset;