From 4a5f6ee69e4a66e7b28f931804df08d5cb4a5c3e Mon Sep 17 00:00:00 2001 From: yuli-ferna <35125931+yuli-ferna@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:21:11 -0300 Subject: [PATCH 1/2] Feature: Hamburguer menu (#540) * advances * fix prettier --- apps/connect/src/components/atoms/NavBar.tsx | 71 ++++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/apps/connect/src/components/atoms/NavBar.tsx b/apps/connect/src/components/atoms/NavBar.tsx index d0b422c1c..b2f46153b 100644 --- a/apps/connect/src/components/atoms/NavBar.tsx +++ b/apps/connect/src/components/atoms/NavBar.tsx @@ -6,6 +6,9 @@ import Toolbar from "@mui/material/Toolbar"; import styled from "@mui/material/styles/styled"; import Box from "@mui/material/Box"; import portal from "../../assets/imgs/logo-white.svg"; +import MenuIcon from "@mui/icons-material/Menu"; +import { useState } from "react"; +import { List, ListItem, ListItemButton, ListItemText } from "@mui/material"; const AppBar = styled(MuiAppBar)(({ theme }) => ({ background: "transparent", @@ -22,18 +25,24 @@ const Link = styled(MuiLink)(({ theme }) => ({ ...theme.typography.body2, fontSize: "14px", fontWeight: 400, - fontFamily: "\"Poppins\", regular", + fontFamily: '"Poppins", regular', color: "#FFFFFFE6", marginLeft: theme.spacing(7), textUnderlineOffset: "6px", [theme.breakpoints.down("sm")]: { marginLeft: theme.spacing(2.5), + fontSize: "0.9rem", + paddingTop: 8, + paddingBottom: 8, + paddingRight: 16, + width: "100%", + lineHeight: "45px", }, [theme.breakpoints.down("xs")]: { marginLeft: theme.spacing(1), }, ":hover": { - textDecoration: "underline" + textDecoration: "underline", }, })); @@ -64,7 +73,17 @@ const Spacer = styled("div")(() => ({ width: "100vw", })); +const womrholescanButton = ( + + + Wormholescan + + + +); + export default function NavBar() { + const [openMenu, setOpenMenu] = useState(false); return ( @@ -72,33 +91,43 @@ export default function NavBar() { - + - { - navBar.map(({ label, active, href }, idx) => - - {label} - - ) - } - + {navBar.map(({ label, active, href }, idx) => ( - Wormholescan + {label} - - + ))} + {womrholescanButton} + + { + setOpenMenu(!openMenu); + }} + /> + + {openMenu && ( + + + {navBar.map(({ label, href }, idx) => ( + + + + + + ))} + {womrholescanButton} + + + )} ); } From d541bfe1285d24024bfc7c3e8d5b6428b8b77a3a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 27 Nov 2023 14:21:38 -0300 Subject: [PATCH 2/2] fix branch-sha and enable cctp warnign (#538) --- .github/workflows/preview.yml | 7 ++++--- .github/workflows/testnet.yml | 7 ++++--- apps/connect/vite.token-bridge.config.ts | 7 +++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 277d75bdb..32a5f8363 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -33,6 +33,7 @@ jobs: name: "Deploy Preview" needs: - build + - branch-sha runs-on: "ubuntu-latest" concurrency: group: ${{ github.ref }}-deploy-preview @@ -52,8 +53,8 @@ jobs: - name: Trigger a preview Deploy run: | sleep 30s - mkdir -p preview/${{ needs.build.outputs.branch-sha }} - pushd preview/${{ needs.build.outputs.branch-sha }} + mkdir -p preview/${{ needs.branch-sha.outputs.value }} + pushd preview/${{ needs.branch-sha.outputs.value }} [[ ! -f .latest ]] && touch .latest [[ ! -f .artifacts ]] && touch .artifacts cat .latest >> .artifacts @@ -61,4 +62,4 @@ jobs: git add .artifacts .latest git commit -m"Update preview artifacts ${{ needs.build.outputs.pkg-version }}" git push - echo "The preview URL is: ${{ vars.PREVIEW_ROOT_URL }}/${{ needs.build.outputs.branch-sha }}/" >> ${GITHUB_STEP_SUMMARY} + echo "The preview URL is: ${{ vars.PREVIEW_ROOT_URL }}/${{ needs.branch-sha.outputs.value }}/" >> ${GITHUB_STEP_SUMMARY} diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 45d854bbd..cf1579d32 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -33,6 +33,7 @@ jobs: name: "Deploy Testnet" needs: - build + - branch-sha runs-on: "ubuntu-latest" concurrency: group: ${{ github.ref }}-deploy-testnet @@ -52,8 +53,8 @@ jobs: - name: Trigger a testnet Deploy run: | sleep 30s - mkdir -p testnet/${{ needs.build.outputs.branch-sha }} - pushd testnet/${{ needs.build.outputs.branch-sha }} + mkdir -p testnet/${{ needs.branch-sha.outputs.value }} + pushd testnet/${{ needs.branch-sha.outputs.value }} [[ ! -f .latest ]] && touch .latest [[ ! -f .artifacts ]] && touch .artifacts cat .latest >> .artifacts @@ -61,4 +62,4 @@ jobs: git add .artifacts .latest git commit -m"Update testnet artifacts ${{ needs.build.outputs.pkg-version }}" git push - echo "The testnet URL is: ${{ vars.TESTNET_ROOT_URL }}/${{ needs.build.outputs.branch-sha }}/" >> ${GITHUB_STEP_SUMMARY} \ No newline at end of file + echo "The testnet URL is: ${{ vars.TESTNET_ROOT_URL }}/${{ needs.branch-sha.outputs.value }}/" >> ${GITHUB_STEP_SUMMARY} \ No newline at end of file diff --git a/apps/connect/vite.token-bridge.config.ts b/apps/connect/vite.token-bridge.config.ts index 7dbdd1df5..62ae25b6a 100644 --- a/apps/connect/vite.token-bridge.config.ts +++ b/apps/connect/vite.token-bridge.config.ts @@ -5,17 +5,20 @@ const PUBLIC_URL = viteConfig.base; const ADVANCE_TOOLS_HREF = `${PUBLIC_URL}/advanced-tools/#/transfer` const ADVANCE_TOOLS_HREF_TEMPLATE = `${ADVANCE_TOOLS_HREF}?sourceChain={:sourceChain}&targetChain={:targetChain}` - +const USDC_BRIDGE_HREF = `${PUBLIC_URL}/usdc-bridge/` // https://vitejs.dev/config/ export default defineConfig({ ...viteConfig, define: { navBar: [ { label: "Home", active: true, href: `${PUBLIC_URL}/` }, - { label: "USDC", href: `${PUBLIC_URL}/usdc-bridge` } + { label: "USDC", href: USDC_BRIDGE_HREF } ], wormholeConnectConfig: { ...viteConfig?.define?.wormholeConnectConfig, + cctpWarning: { + href: USDC_BRIDGE_HREF + }, moreNetworks: { href: ADVANCE_TOOLS_HREF_TEMPLATE, target: "_blank",