From 214ee4df738f3c7cdc3e972616057acffaa3408a Mon Sep 17 00:00:00 2001 From: Anton Lykhoyda Date: Fri, 6 Dec 2024 17:35:03 +0100 Subject: [PATCH 1/9] add navigation --- packages/web-wallet/package.json | 3 +- .../src/assets/icons/arrow-receive.svg | 3 + .../src/assets/icons/arrow-transfer.svg | 3 + .../web-wallet/src/assets/icons/clock.svg | 3 + .../src/assets/icons/shield-divided.svg | 3 + .../web-wallet/src/assets/icons/shield.svg | 3 + .../web-wallet/src/assets/icons/summary.svg | 3 + packages/web-wallet/src/assets/index.ts | 14 + .../src/components/Footer/Footer.tsx | 8 +- .../src/components/Header/Header.tsx | 23 +- .../src/components/Layout/Layout.tsx | 2 +- .../ProtectedRoute/ProtectedRoute.tsx | 15 ++ packages/web-wallet/src/main.tsx | 22 +- .../web-wallet/src/pages/AccountSummary.tsx | 5 + packages/web-wallet/src/pages/Dashboard.tsx | 68 ++++- packages/web-wallet/src/pages/Home.tsx | 13 +- packages/web-wallet/src/pages/Receive.tsx | 5 + .../src/pages/TransactionHistory.tsx | 5 + .../web-wallet/src/pages/TransferBalance.tsx | 5 + packages/web-wallet/src/styles/index.css | 18 ++ packages/web-wallet/src/types/custom.d.ts | 6 - packages/web-wallet/tailwind.config.js | 3 + packages/web-wallet/vite.config.ts | 15 +- yarn.lock | 250 +++++++++++++++++- 24 files changed, 456 insertions(+), 42 deletions(-) create mode 100644 packages/web-wallet/src/assets/icons/arrow-receive.svg create mode 100644 packages/web-wallet/src/assets/icons/arrow-transfer.svg create mode 100644 packages/web-wallet/src/assets/icons/clock.svg create mode 100644 packages/web-wallet/src/assets/icons/shield-divided.svg create mode 100644 packages/web-wallet/src/assets/icons/shield.svg create mode 100644 packages/web-wallet/src/assets/icons/summary.svg create mode 100644 packages/web-wallet/src/components/ProtectedRoute/ProtectedRoute.tsx create mode 100644 packages/web-wallet/src/pages/AccountSummary.tsx create mode 100644 packages/web-wallet/src/pages/Receive.tsx create mode 100644 packages/web-wallet/src/pages/TransactionHistory.tsx create mode 100644 packages/web-wallet/src/pages/TransferBalance.tsx diff --git a/packages/web-wallet/package.json b/packages/web-wallet/package.json index 1f700ea..2c6820c 100644 --- a/packages/web-wallet/package.json +++ b/packages/web-wallet/package.json @@ -32,6 +32,7 @@ "tailwindcss": "^3.4.14", "typescript": "~5.6.2", "typescript-eslint": "^8.11.0", - "vite": "^5.4.10" + "vite": "^5.4.10", + "vite-plugin-svgr": "^4.3.0" } } diff --git a/packages/web-wallet/src/assets/icons/arrow-receive.svg b/packages/web-wallet/src/assets/icons/arrow-receive.svg new file mode 100644 index 0000000..231a32d --- /dev/null +++ b/packages/web-wallet/src/assets/icons/arrow-receive.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/icons/arrow-transfer.svg b/packages/web-wallet/src/assets/icons/arrow-transfer.svg new file mode 100644 index 0000000..92a4e73 --- /dev/null +++ b/packages/web-wallet/src/assets/icons/arrow-transfer.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/icons/clock.svg b/packages/web-wallet/src/assets/icons/clock.svg new file mode 100644 index 0000000..524a261 --- /dev/null +++ b/packages/web-wallet/src/assets/icons/clock.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/icons/shield-divided.svg b/packages/web-wallet/src/assets/icons/shield-divided.svg new file mode 100644 index 0000000..5a8c47d --- /dev/null +++ b/packages/web-wallet/src/assets/icons/shield-divided.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/icons/shield.svg b/packages/web-wallet/src/assets/icons/shield.svg new file mode 100644 index 0000000..199ca56 --- /dev/null +++ b/packages/web-wallet/src/assets/icons/shield.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/icons/summary.svg b/packages/web-wallet/src/assets/icons/summary.svg new file mode 100644 index 0000000..d27232e --- /dev/null +++ b/packages/web-wallet/src/assets/icons/summary.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web-wallet/src/assets/index.ts b/packages/web-wallet/src/assets/index.ts index e526848..5cf95b6 100644 --- a/packages/web-wallet/src/assets/index.ts +++ b/packages/web-wallet/src/assets/index.ts @@ -5,6 +5,14 @@ import MetaMaskSnapsLogoSvg from './metamask-snaps-logo.svg'; import ZcashSvg from './zcash.svg'; import ZcashYellowSvg from './zcash-yellow.svg'; +// Icons +import ArrowReceiveSvg from './icons/arrow-receive.svg'; +import ArrowTransferSvg from './icons/arrow-transfer.svg'; +import ClockSvg from './icons/clock.svg'; +import ShieldSvg from './icons/shield.svg'; +import ShieldDividedSvg from './icons/shield-divided.svg'; +import SummarySvg from './icons/summary.svg'; + export { ChainsafeSvg, MetaMaskLogoSvg, @@ -12,4 +20,10 @@ export { ZcashSvg, ZcashYellowSvg, FormTransferSvg, + ArrowReceiveSvg, + ArrowTransferSvg, + ClockSvg, + ShieldSvg, + ShieldDividedSvg, + SummarySvg, }; diff --git a/packages/web-wallet/src/components/Footer/Footer.tsx b/packages/web-wallet/src/components/Footer/Footer.tsx index 04af4a3..8510284 100644 --- a/packages/web-wallet/src/components/Footer/Footer.tsx +++ b/packages/web-wallet/src/components/Footer/Footer.tsx @@ -11,11 +11,9 @@ const Footer = (): React.JSX.Element => { href="https://chainsafe.io/" target="_blank" > - Chainsafe Systems Logo +
+ +
ChainSafe diff --git a/packages/web-wallet/src/components/Header/Header.tsx b/packages/web-wallet/src/components/Header/Header.tsx index e6df52c..7e293e1 100644 --- a/packages/web-wallet/src/components/Header/Header.tsx +++ b/packages/web-wallet/src/components/Header/Header.tsx @@ -1,40 +1,39 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import ZcashSvg from '../../assets/zcash.svg'; -import MetemaskSnap from '../../assets/metamask-snaps-logo.svg'; +import { MetaMaskSnapsLogoSvg, ZcashSvg } from '../../assets'; const Header = (): React.JSX.Element => { return ( -
+
- MetaMask Logo - MetaMask Logo +
+ +
+
+ +