From 57fb471f9ddcc94ada9c35a843b17847f5479af1 Mon Sep 17 00:00:00 2001 From: Atatakai Date: Thu, 23 May 2024 19:03:52 +0400 Subject: [PATCH] Add custom alerts, update needs funds copy --- frontend/components/Main/Main.tsx | 2 +- frontend/components/Main/MainAddFunds.tsx | 24 +++----- frontend/components/Main/MainGasBalance.tsx | 9 ++- frontend/components/Main/MainNeedsFunds.tsx | 61 +++++++++---------- frontend/components/Main/MainRewards.tsx | 9 ++- frontend/components/Settings/Settings.tsx | 14 ++--- .../Setup/Create/SetupEoaFunding.tsx | 21 ++----- frontend/components/common/Alert.tsx | 28 +++++++++ frontend/components/styled/CardSection.tsx | 4 +- frontend/constants/color.ts | 2 +- frontend/styles/globals.scss | 47 ++++++++++++-- frontend/theme/mainTheme.ts | 6 -- 12 files changed, 134 insertions(+), 93 deletions(-) create mode 100644 frontend/components/common/Alert.tsx diff --git a/frontend/components/Main/Main.tsx b/frontend/components/Main/Main.tsx index 460ba061..cfffd702 100644 --- a/frontend/components/Main/Main.tsx +++ b/frontend/components/Main/Main.tsx @@ -39,10 +39,10 @@ export const Main = () => { style={{ borderTopColor: 'transparent' }} > - + diff --git a/frontend/components/Main/MainAddFunds.tsx b/frontend/components/Main/MainAddFunds.tsx index 2058e70f..9f4ef935 100644 --- a/frontend/components/Main/MainAddFunds.tsx +++ b/frontend/components/Main/MainAddFunds.tsx @@ -1,10 +1,8 @@ import { CopyOutlined, // QrcodeOutlined, - WarningOutlined, } from '@ant-design/icons'; import { - Alert, Button, Flex, message, @@ -18,11 +16,12 @@ import { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; import { copyToClipboard, truncateAddress } from '@/common-util'; -import { COLOR, COW_SWAP_GNOSIS_XDAI_OLAS_URL } from '@/constants'; +import { COW_SWAP_GNOSIS_XDAI_OLAS_URL } from '@/constants'; import { UNICODE_SYMBOLS } from '@/constants/unicode'; import { useWallet } from '@/hooks/useWallet'; import { Address } from '@/types'; +import { Alert } from '../common/Alert'; import { CardSection } from '../styled/CardSection'; const { Text } = Typography; @@ -94,16 +93,15 @@ export const MainAddFunds = () => { const AddFundsWarningAlertSection = () => ( } message={ - + Only send funds on Gnosis Chain! - + You will lose any assets you send on other chains. @@ -121,7 +119,7 @@ const AddFundsAddressSection = ({ truncatedFundingAddress?: string; handleCopy: () => void; }) => ( - + @@ -132,9 +130,7 @@ const AddFundsAddressSection = ({ GNO: {truncatedFundingAddress ?? '--'} - + +