Skip to content

Commit

Permalink
bugfix: Sunset notification on card
Browse files Browse the repository at this point in the history
  • Loading branch information
brucedonovan committed Jan 16, 2024
1 parent 319e829 commit 0f67b0e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/FooterInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const FooterInfo = () => {
<>
<Box gap="small" align="end" width="20%" style={{ position: 'absolute', bottom: '3em', right: '3em' }}>
<Box alignSelf="end" width="225px">
<PublicNotificationSunset />
{/* <PublicNotificationSunset /> */}
<PublicNotification />
</Box>
<Box alignSelf="end">
Expand Down
35 changes: 18 additions & 17 deletions src/components/PublicNotificationSunset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,31 @@ const PublicNotificationSunset = ({ children }: PublicNotificationProps) => {
<Box direction="row" align="center" justify="between">
<Box direction="column" border={{ size: 'small' }} pad="small" gap="small" align="center" round="xsmall">
<Box gap="small" align="center">
<Box direction="row" gap="xsmall" align="center">
{/* <Text size="medium">
<FiAlertTriangle />
</Text> */}
<Text size="medium" weight={'bold'}>
Important Notice:{' '}
<Box gap="xsmall" align="center">
<Box>
<Text size="medium" weight={'bold'}>
Important Notice:
</Text>
</Box>
<Box>
<Text size="medium" weight={'normal'}>
Yield Protocol Shutting Down
</Text>
</Text>
</Box>
</Box>
<Text size="xsmall" textAlign="center" weight={'normal'}>
As of 31st of December 2023, the Yield Protocol will be officially discontinued.
</Text>
<Text size="xsmall" textAlign="center" weight={'normal'}>
Contact us on our {" "}
{/* </Text> */}
{/* <Text size="xsmall" textAlign="center" weight={'normal'}> */}
{' '}Contact us on our{' '}
<a
target="_blank"
href="https://discord.gg/JAFfDj5"
style={{ color: 'rgb(255,255,255)', cursor: 'pointer' }}
>
discord channel
</a> {" "}
with any support issues until 31 January 2024.
target="_blank"
href="https://discord.gg/JAFfDj5"
style={{ color: 'rgb(255,255,255)', cursor: 'pointer' }}
>
discord channel
</a>{' '}
with any support issues until 31 January 2024.
</Text>
</Box>
</Box>
Expand Down
5 changes: 5 additions & 0 deletions src/components/views/Borrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import useAnalytics from '../../hooks/useAnalytics';
import { WETH } from '../../config/assets';
import useContracts from '../../hooks/useContracts';
import useAccountPlus from '../../hooks/useAccountPlus';
import PublicNotificationSunset from '../PublicNotificationSunset';

const Borrow = () => {
const mobile: boolean = useContext<any>(ResponsiveContext) === 'small';
Expand Down Expand Up @@ -545,6 +546,10 @@ const Borrow = () => {
</Box>

<Box id="midsection">

<Box pad="large" gap="small">
<PublicNotificationSunset />
</Box>
{stepPosition === 2 &&
borrowProcess?.stage === ProcessStage.PROCESS_COMPLETE &&
borrowProcess?.tx.status === TxState.SUCCESSFUL && (
Expand Down
8 changes: 6 additions & 2 deletions src/components/views/Lend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { WETH } from '../../config/assets';
import useAccountPlus from '../../hooks/useAccountPlus';
import useAffectedJuneLenders from '../../hooks/useAffectedJuneLenders';
import useChainId from '../../hooks/useChainId';
import PublicNotificationSunset from '../PublicNotificationSunset';

const Lend = () => {
const mobile: boolean = useContext<any>(ResponsiveContext) === 'small';
Expand Down Expand Up @@ -77,8 +78,6 @@ const Lend = () => {
/* input validation hooks */
const { inputError: lendError } = useInputValidation(lendInput, ActionCodes.LEND, selectedSeries, [0, maxLend_]);



/* LOCAL FNS */
const handleLend = () => {
if (lendDisabled) return;
Expand Down Expand Up @@ -221,6 +220,11 @@ const Lend = () => {
</Box>
</>
)}

<Box pad="large" gap="small">
<PublicNotificationSunset />
</Box>

{stepPosition === 1 && (
<>
<Box
Expand Down
5 changes: 5 additions & 0 deletions src/components/views/Pool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { WETH } from '../../config/assets';
import { StrategyType } from '../../config/strategies';
import { toast } from 'react-toastify';
import useAccountPlus from '../../hooks/useAccountPlus';
import PublicNotificationSunset from '../PublicNotificationSunset';

function Pool() {
const mobile: boolean = useContext<any>(ResponsiveContext) === 'small';
Expand Down Expand Up @@ -203,6 +204,10 @@ function Pool() {
</Box>
)}

<Box pad="large" gap="small">
<PublicNotificationSunset />
</Box>

{stepPosition === 1 && (
<>
<Box
Expand Down

0 comments on commit 0f67b0e

Please sign in to comment.