Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate message #1133

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions projects/ui/src/components/App/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { Box } from '@mui/material';
import { Box, Stack, Typography } from '@mui/material';
import BigNumber from 'bignumber.js';
import { ToastBar, Toaster } from 'react-hot-toast';
import { Navigate, Route, Routes } from 'react-router-dom';
Expand Down Expand Up @@ -46,7 +46,7 @@ import pageBackground from '~/img/beanstalk/interface/bg/spring.png';
import EnforceNetwork from '~/components/App/EnforceNetwork';
import useAccount from '~/hooks/ledger/useAccount';
import './App.css';
import "react-day-picker/dist/style.css";
import 'react-day-picker/dist/style.css';

import { FC } from '~/types';

Expand All @@ -62,6 +62,7 @@ import VotingPowerPage from '~/pages/governance/votingPower';
import MorningUpdater from '~/state/beanstalk/sun/morning';
import MorningFieldUpdater from '~/state/beanstalk/field/morning';
import BeanstalkCaseUpdater from '~/state/beanstalk/case/updater';
import useSdk from '~/hooks/sdk';
import MigrationPreview from '../../pages/preview';
// import Snowflakes from './theme/winter/Snowflakes';

Expand Down Expand Up @@ -98,10 +99,72 @@ const CustomToaster: FC<{ navHeight: number }> = ({ navHeight }) => (
</Toaster>
);

function MigrationInProgress() {
const banner = useBanner();
const navHeight = useNavHeight(!!banner);

const sdk = useSdk();
const account = useAccount();

return (
<>
<NavBar>{null}</NavBar>
<CustomToaster navHeight={navHeight} />
<Box
sx={{
bgcolor: 'background.default',
backgroundImage: `url(${pageBackground})`,
backgroundAttachment: 'fixed',
backgroundPosition: 'bottom center',
backgroundSize: '100%',
backgroundRepeat: 'no-repeat',
width: '100%',
minHeight: `calc(100vh - ${navHeight}px)`,
}}
>
<Stack
sx={{
width: '100vw',
minHeight: `calc(100vh - ${navHeight}px)`,
alignItems: 'center',
justifyContent: 'center',
}}
>
<Box sx={{ marginTop: 0 }}>
<Box>
<Typography variant="h1">{`We're migrating!`}</Typography>
<Typography variant="body1" textAlign="center">
Please check discord for details.
</Typography>
</Box>
{/* <Routes>
<Route index element={<L1Delegate />} />
<Route path="*" element={<L1Delegate />} />
<Route path="/l1delegate" element={<L1Delegate />} />
<Route path="/l1" element={<L1Delegate />} />
<Route path="/ethereum" element={<L1Delegate />} />
<Route path="/l2claim" element={<L2Claim />} />
<Route path="/l2" element={<L2Claim />} />
<Route path="/arbitrum" element={<L2Claim />} />
<Route path="/404" element={<PageNotFound />} />
</Routes> */}
</Box>
</Stack>
</Box>
</>
);
}

const migrating = true;

export default function App() {
const banner = useBanner();
const navHeight = useNavHeight(!!banner);
const account = useAccount();
if (migrating) {
return <MigrationInProgress />;
}

return (
<>
{/* -----------------------
Expand Down
10 changes: 5 additions & 5 deletions projects/ui/src/components/Nav/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const NavBar: FC<{}> = ({ children }) => {
>
{/* Desktop: Left Side */}
<Row sx={{ flex: 1 }} height="100%" gap={1}>
<PriceButton sx={{ height: NAV_ELEM_HEIGHT }} />
<SunButton sx={{ height: NAV_ELEM_HEIGHT }} />
{false && <PriceButton sx={{ height: NAV_ELEM_HEIGHT }} />}
{false && <SunButton sx={{ height: NAV_ELEM_HEIGHT }} />}
<Row
sx={{ display: { lg: 'flex', xs: 'none' } }}
height="100%"
Expand All @@ -62,10 +62,10 @@ const NavBar: FC<{}> = ({ children }) => {
{/* Desktop: Right Side */}
<Row justifyContent="flex-end" gap={1}>
<Box sx={{ display: { sm: 'block', xs: 'none' } }}>
<NetworkButton sx={{ height: NAV_ELEM_HEIGHT }} />
{false && <NetworkButton sx={{ height: NAV_ELEM_HEIGHT }} />}
</Box>
<WalletButton sx={{ height: NAV_ELEM_HEIGHT }} />
<AboutButton sx={{ height: NAV_ELEM_HEIGHT }} />
{false && <WalletButton sx={{ height: NAV_ELEM_HEIGHT }} />}
{false && <AboutButton sx={{ height: NAV_ELEM_HEIGHT }} />}
</Row>
</Row>
</AppBar>
Expand Down
Loading