From 3596dfbc92fbdfc691aa75af736aade283751ba7 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Mon, 24 Jan 2022 01:28:05 +0000 Subject: [PATCH] UI - Added more links, relayer fee --- react/src/components/Footer.tsx | 116 ++++++++++++++++++++++++++++++++ react/src/icons/Discord.svg | 3 + react/src/icons/Docs.svg | 14 ++++ react/src/icons/Github.svg | 3 + react/src/icons/Medium.svg | 1 + react/src/icons/Telegram.svg | 3 + react/src/icons/Twitter.svg | 3 + react/src/views/Home.tsx | 38 ++++++----- 8 files changed, 164 insertions(+), 17 deletions(-) create mode 100644 react/src/components/Footer.tsx create mode 100644 react/src/icons/Discord.svg create mode 100644 react/src/icons/Docs.svg create mode 100644 react/src/icons/Github.svg create mode 100644 react/src/icons/Medium.svg create mode 100644 react/src/icons/Telegram.svg create mode 100644 react/src/icons/Twitter.svg diff --git a/react/src/components/Footer.tsx b/react/src/components/Footer.tsx new file mode 100644 index 0000000..ba8afef --- /dev/null +++ b/react/src/components/Footer.tsx @@ -0,0 +1,116 @@ +import { IconButton, makeStyles, Typography } from "@material-ui/core"; +import Discord from "../icons/Discord.svg"; +import Docs from "../icons/Docs.svg"; +import Github from "../icons/Github.svg"; +import Medium from "../icons/Medium.svg"; +import Telegram from "../icons/Telegram.svg"; +import Twitter from "../icons/Twitter.svg"; +import Wormhole from "../icons/wormhole-network.svg"; + +const useStyles = makeStyles((theme) => ({ + footer: { + margin: theme.spacing(2, 0, 2), + textAlign: "center", + }, + socialIcon: { + "& img": { + height: 24, + width: 24, + }, + }, + builtWithContainer: { + display: "flex", + alignItems: "center", + justifyContent: "center", + opacity: 0.5, + marginTop: theme.spacing(1), + }, + wormholeIcon: { + height: 48, + width: 48, + filter: "contrast(0)", + transition: "filter 0.5s", + "&:hover": { + filter: "contrast(1)", + }, + verticalAlign: "middle", + marginRight: theme.spacing(1), + }, +})); + +export default function Footer() { + const classes = useStyles(); + return ( + + ); +} diff --git a/react/src/icons/Discord.svg b/react/src/icons/Discord.svg new file mode 100644 index 0000000..8140991 --- /dev/null +++ b/react/src/icons/Discord.svg @@ -0,0 +1,3 @@ + + + diff --git a/react/src/icons/Docs.svg b/react/src/icons/Docs.svg new file mode 100644 index 0000000..887a45c --- /dev/null +++ b/react/src/icons/Docs.svg @@ -0,0 +1,14 @@ + + + + + diff --git a/react/src/icons/Github.svg b/react/src/icons/Github.svg new file mode 100644 index 0000000..a1e9c73 --- /dev/null +++ b/react/src/icons/Github.svg @@ -0,0 +1,3 @@ + + + diff --git a/react/src/icons/Medium.svg b/react/src/icons/Medium.svg new file mode 100644 index 0000000..14604f8 --- /dev/null +++ b/react/src/icons/Medium.svg @@ -0,0 +1 @@ + diff --git a/react/src/icons/Telegram.svg b/react/src/icons/Telegram.svg new file mode 100644 index 0000000..c3250d5 --- /dev/null +++ b/react/src/icons/Telegram.svg @@ -0,0 +1,3 @@ + + + diff --git a/react/src/icons/Twitter.svg b/react/src/icons/Twitter.svg new file mode 100644 index 0000000..0333a76 --- /dev/null +++ b/react/src/icons/Twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/react/src/views/Home.tsx b/react/src/views/Home.tsx index b5fd2cd..63db034 100644 --- a/react/src/views/Home.tsx +++ b/react/src/views/Home.tsx @@ -24,7 +24,6 @@ import { WORMHOLE_RPC_HOSTS, } from "../utils/consts"; import { COLORS } from "../muiTheme"; -import Wormhole from "../icons/wormhole-network.svg"; import { UniswapToUniswapExecutor } from "../swapper/swapper"; import { Web3Provider } from "@ethersproject/providers"; import { hexlify, hexStripZeros } from "ethers/lib/utils"; @@ -37,6 +36,7 @@ import getIsTransferCompletedEvmWithRetry from "../utils/getIsTransferCompletedW import CircleLoader from "../components/CircleLoader"; import { ArrowForward, CheckCircleOutlineRounded } from "@material-ui/icons"; import SwapProgress from "../components/SwapProgress"; +import Footer from "../components/Footer"; const useStyles = makeStyles((theme) => ({ bg: { @@ -415,9 +415,14 @@ export default function Home() { placeholder="0.0" > {`Slippage tolerance: ${slippage}%`} + {`Relayer fee: ${RELAYER_FEE_UST} UST`} {!isSwapping && } sourceTokenInfo.maxAmount} + disabled={ + !readyToSwap || + isSwapping || + parseFloat(amountIn) > sourceTokenInfo.maxAmount + } showLoader={isSwapping} onClick={handleSwapClick} > @@ -473,23 +478,22 @@ export default function Home() {
- - - powered by wormhole - - - Wormhole -
- - Repo - -
-
- +