diff --git a/src/components/ActiveTransaction.tsx b/src/components/ActiveTransaction.tsx index e8c4df76b..ce4767f9e 100644 --- a/src/components/ActiveTransaction.tsx +++ b/src/components/ActiveTransaction.tsx @@ -23,20 +23,23 @@ const InfoBlock = ({ }) => ( <> {full ? ( - - - + + + {icon} {title} - - {subTitle} - {button && {button}} + + + + {subTitle} + + + {button && ( + + {button} + + )} @@ -47,8 +50,11 @@ const InfoBlock = ({ {title} - - {subTitle} + + + {subTitle} + + {button} @@ -79,10 +85,10 @@ const ActiveTransaction = ({ const activeProcess = txProcess; return ( - + {!full && (activeProcess?.stage === ProcessStage.PROCESS_INACTIVE || !activeProcess) && ( - - Review Transaction + + Review Transaction {!full && cancelAction() : () => null} />} )} @@ -91,7 +97,8 @@ const ActiveTransaction = ({ background={full ? undefined : 'gradient-transparent'} round="xsmall" pad={full ? { horizontal: 'large' } : 'small'} - height={full? undefined: { min:'100px' } } + height={full ? undefined : { min: '100px' }} + fill > {(activeProcess?.stage === ProcessStage.PROCESS_INACTIVE || !activeProcess) && ( <> diff --git a/src/components/Connect.tsx b/src/components/Connect.tsx index 4d50cdc38..cfa0299b4 100644 --- a/src/components/Connect.tsx +++ b/src/components/Connect.tsx @@ -3,7 +3,7 @@ import { Box, ResponsiveContext, Text } from 'grommet'; import { ChainContext } from '../contexts/ChainContext'; import BackButton from './buttons/BackButton'; import Disclaimer from './Disclaimer'; -import { SettingsContext } from '../contexts/SettingsContext'; +import { Settings, SettingsContext } from '../contexts/SettingsContext'; import { ISettingsContext } from '../types'; import GeneralButton from './buttons/GeneralButton'; import YieldMark from './logos/YieldMark'; @@ -69,10 +69,12 @@ const Connect = ({ setSettingsOpen, setConnectOpen }: any) => { {disclaimerChecked === false && ( - updateSetting('disclaimerChecked', event.target.checked)} - /> + + updateSetting(Settings.DISCLAIMER_CHECKED, event.target.checked)} + /> + )} {[...CONNECTORS.keys()].map((name: string) => { diff --git a/src/components/CurrencyToggle.tsx b/src/components/CurrencyToggle.tsx index 628cc8ee3..6fcc308f5 100644 --- a/src/components/CurrencyToggle.tsx +++ b/src/components/CurrencyToggle.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react'; import { Box, Text } from 'grommet'; -import { SettingsContext } from '../contexts/SettingsContext'; +import { Settings, SettingsContext } from '../contexts/SettingsContext'; import { ISettingsContext } from '../types'; const CurrencyToggle = () => { @@ -17,7 +17,7 @@ const CurrencyToggle = () => { // border={dashCurrency === 'USDC' ? undefined : { color: 'lightgrey' }} background={dashCurrency === 'USDC' ? 'gradient-transparent' : undefined} round={{ corner: 'left' }} - onClick={() => updateSetting('dashCurrency', 'USDC')} + onClick={() => updateSetting(Settings.DASH_CURRENCY, 'USDC')} align="center" justify="center" elevation={dashCurrency === 'USDC' ? 'xsmall' : 'small'} @@ -30,7 +30,7 @@ const CurrencyToggle = () => { // border={dashCurrency === 'ETH' ? undefined : { color: 'lightgrey' }} background={dashCurrency === 'ETH' ? 'gradient-transparent' : undefined} round={{ corner: 'right' }} - onClick={() => updateSetting('dashCurrency', 'ETH')} + onClick={() => updateSetting(Settings.DASH_CURRENCY, 'ETH')} align="center" justify="center" elevation={dashCurrency === 'ETH' ? 'xsmall' : 'small'} diff --git a/src/components/DashboardSettings.tsx b/src/components/DashboardSettings.tsx index 009998950..6e0443b8b 100644 --- a/src/components/DashboardSettings.tsx +++ b/src/components/DashboardSettings.tsx @@ -2,7 +2,7 @@ import { useState, useContext } from 'react'; import { Button, DropButton, Text, Box } from 'grommet'; import { FiMoreVertical } from 'react-icons/fi'; import { ActionType } from '../types'; -import { SettingsContext } from '../contexts/SettingsContext'; +import { Settings, SettingsContext } from '../contexts/SettingsContext'; const DashboardSettings = ({ actionType }: { actionType: string }) => { const { @@ -18,7 +18,7 @@ const DashboardSettings = ({ actionType }: { actionType: string }) => {