From f74b44426030353e27a76cf4187579ccbb682fe8 Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Thu, 14 Dec 2023 13:03:08 +0100 Subject: [PATCH] feat: modified animation, added path aliases, fixed balance showing --- src/app/app.tsx | 2 +- .../components/lock-screen/lock-screen.tsx | 2 +- .../components/mint-unmint.layout.tsx | 47 ++----------------- .../mint/components/mint.layout.tsx | 1 - .../protocol-summary-stack.tsx | 2 +- .../transaction-form/transaction-form.tsx | 2 +- .../transaction-summary.tsx | 19 +++----- .../components/unmint-vault-selector.tsx | 5 +- .../components/mint-unmint/mint-unmint.tsx | 2 +- .../select-wallet-modal.tsx | 3 +- .../successful-flow-modal.tsx | 1 + .../my-vaults-small/my-vaults-small.tsx | 2 +- .../my-vaults-header-balance-info.tsx | 2 +- .../components/my-vaults/my-vaults-large.tsx | 4 +- src/app/hooks/use-ethereum.ts | 16 +++---- src/styles/css-styles.ts | 10 ++++ src/styles/modal-theme.ts | 2 +- tsconfig.json | 2 + vite.config.ts | 8 ++++ 19 files changed, 52 insertions(+), 80 deletions(-) diff --git a/src/app/app.tsx b/src/app/app.tsx index 6600bb51..308339b6 100644 --- a/src/app/app.tsx +++ b/src/app/app.tsx @@ -2,10 +2,10 @@ import { Route } from 'react-router-dom'; import { AppLayout } from '@components/app.layout'; import { MyVaults } from '@pages/my-vaults/my-vaults'; +import { BalanceContextProvider } from '@providers/balance-context-provider'; import { About } from './pages/about/about'; import { Dashboard } from './pages/dashboard/dashboard'; -import { BalanceContextProvider } from './providers/balance-context-provider'; import { BlockchainContextProvider } from './providers/blockchain-context-provider'; import { VaultContextProvider } from './providers/vault-context-provider'; diff --git a/src/app/components/mint-unmint/components/lock-screen/lock-screen.tsx b/src/app/components/mint-unmint/components/lock-screen/lock-screen.tsx index 10deef6c..06f52836 100644 --- a/src/app/components/mint-unmint/components/lock-screen/lock-screen.tsx +++ b/src/app/components/mint-unmint/components/lock-screen/lock-screen.tsx @@ -5,9 +5,9 @@ import { Button, VStack } from '@chakra-ui/react'; import { VaultCard } from '@components/vault/vault-card'; import { useVaults } from '@hooks/use-vaults'; import { Vault } from '@models/vault'; +import { BlockchainContext } from '@providers/blockchain-context-provider'; import { mintUnmintActions } from '@store/slices/mintunmint/mintunmint.actions'; -import { BlockchainContext } from '../../../../providers/blockchain-context-provider'; import { LockScreenProtocolFee } from './components/protocol-fee'; interface LockScreenProps { diff --git a/src/app/components/mint-unmint/components/mint-unmint.layout.tsx b/src/app/components/mint-unmint/components/mint-unmint.layout.tsx index a2c40b7e..247f0959 100644 --- a/src/app/components/mint-unmint/components/mint-unmint.layout.tsx +++ b/src/app/components/mint-unmint/components/mint-unmint.layout.tsx @@ -1,47 +1,12 @@ -import { VStack, keyframes } from '@chakra-ui/react'; +import { VStack } from '@chakra-ui/react'; +import { boxShadowAnimation } from '@styles/css-styles'; interface MintUnmintLayoutProps { children: React.ReactNode; animate?: boolean; - step?: number; } -export function MintUnmintLayout({ children, animate, step }: MintUnmintLayoutProps): React.JSX.Element { - const glow = keyframes` - 0% { box-shadow: 0 0 5px rgba(255,255,255,0); } - 25% { box-shadow: 0 0 10px rgba(255,255,255,0.5); } - 50% { box-shadow: 0 0 15px rgba(255,255,255,0.75); } - 75% { box-shadow: 0 0 10px rgba(255,255,255,0.5); } - 100% { box-shadow: 0 0 5px rgba(7,232,216,0); } -`; - -const swimUp = keyframes` - 0% { - transform: translateY(0px); - opacity: 1; - } - 5% { - transform: translateY(0px); - opacity: 0.5; - } - 15% { - transform: translateY(0px); - opacity: 0; - } - 25% { - transform: translateY(175px); - opacity: 0; - } - 50% { - transform: translateY(75px); - opacity: 0.5; - } - 100% { - transform: translateY(0); - opacity: 1; - } -`; - +export function MintUnmintLayout({ children, animate }: MintUnmintLayoutProps): React.JSX.Element { return ( {children} diff --git a/src/app/components/mint-unmint/components/mint/components/mint.layout.tsx b/src/app/components/mint-unmint/components/mint/components/mint.layout.tsx index baa51fd2..a9f67f1d 100644 --- a/src/app/components/mint-unmint/components/mint/components/mint.layout.tsx +++ b/src/app/components/mint-unmint/components/mint/components/mint.layout.tsx @@ -2,7 +2,6 @@ import { VStack } from '@chakra-ui/react'; import { HasChildren } from '@models/has-children'; export function MintLayout({ children }: HasChildren): React.JSX.Element { - return ( void; } export function TransactionSummary({ currentStep, flow, blockchain, + handleClose, }: TransactionSummaryProps): React.JSX.Element { const navigate = useNavigate(); const dispatch = useDispatch(); @@ -68,19 +70,9 @@ export function TransactionSummary({ /> )} - + - You can check all of your vaults' status under{' '} - - My Vaults - {' '} - tab. + View vault statuses in the My Vaults tab.