Skip to content

Commit

Permalink
Bean UI - L1 Transfer form (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncoolzero authored Oct 12, 2024
2 parents b007508 + 9009e9e commit da9e639
Show file tree
Hide file tree
Showing 3 changed files with 657 additions and 6 deletions.
2 changes: 2 additions & 0 deletions projects/ui/src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import L2Claim from '~/pages/l2claim';
import L1Delegate from '~/pages/l1delegate';

import MigrationPreview from '../../pages/preview';
import L1Transfer from '~/pages/l1transfer';

// import Snowflakes from './theme/winter/Snowflakes';

Expand Down Expand Up @@ -146,6 +147,7 @@ function MigrationGate() {
<Route path="/l2claim" element={<L2Claim />} />
<Route path="/l2" element={<L2Claim />} />
<Route path="/arbitrum" element={<L2Claim />} />
<Route path="/l1transfer" element={<L1Transfer />} />
<Route path="/404" element={<PageNotFound />} />
</Routes>
</Box>
Expand Down
15 changes: 9 additions & 6 deletions projects/ui/src/components/Nav/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { AppBar, Box } from '@mui/material';
import { AppBar, Box, useMediaQuery, useTheme } from '@mui/material';
import WalletButton from '~/components/Common/Connection/WalletButton';
import NetworkButton from '~/components/Common/Connection/NetworkButton';
import {
Expand All @@ -20,7 +20,7 @@ import HoverMenu from './HoverMenu';
import { PAGE_BORDER_COLOR } from '../App/muiTheme';
import BeanProgressIcon from '../Common/BeanProgressIcon';

const L1NavBar = () => (
const L1NavBar = ({ isMobile }: { isMobile: boolean }) => (
<>
<AppBar
className="navbar"
Expand All @@ -34,22 +34,23 @@ const L1NavBar = () => (
{/* Desktop: Right Side */}
<Row
justifyContent="space-between"
gap={1}
gap={isMobile ? 0 : 1}
px={1}
height={`${NAV_HEIGHT}px`}
>
<Box
px={2}
px={isMobile ? 1 : 2}
height={`${NAV_HEIGHT}px`}
sx={{
display: 'flex',
flexDirection: 'row',
gap: 2,
gap: isMobile ? 0 : 2,
alignItems: 'center',
}}
>
<BeanProgressIcon size={25} enabled={false} variant="indeterminate" />
<LinkButton key="/" to="/" title="Migration" />
<LinkButton key="/l1transfer" to="/l1transfer" title="Transfer" />
</Box>
<Row gap={1}>
<Box sx={{ display: { sm: 'block', xs: 'none' } }}>
Expand All @@ -65,9 +66,11 @@ const L1NavBar = () => (

const NavBar: FC<{}> = ({ children }) => {
const { isArbitrum, isArbMainnet } = useChainState();
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));

if (!isArbitrum) {
return <L1NavBar />;
return <L1NavBar isMobile={isMobile} />;
}

return (
Expand Down
Loading

0 comments on commit da9e639

Please sign in to comment.