Skip to content

Commit

Permalink
🐛ethereum: fix ethereum render
Browse files Browse the repository at this point in the history
  • Loading branch information
franm91 committed Sep 6, 2024
1 parent 1b6208d commit c28ba1c
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 71 deletions.
7 changes: 6 additions & 1 deletion components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { identify, track } from '../../utils/mixpanel';
import useReadOnly from 'hooks/useReadOnly';
import { AccountInput } from 'components/AccountInput';
import StakingNavButton from 'components/staking/StakingNavButton';
import { StakeEXAProvider } from 'contexts/StakeEXAContext';

const { onlyMobile, onlyDesktopFlex } = globals;

Expand Down Expand Up @@ -226,7 +227,11 @@ function Navbar() {
<Chip label="OP Sepolia Faucet" onClick={openFaucet} sx={{ my: 'auto', display: onlyDesktopFlex }} />
)}
<Box display="flex" gap={0.5}>
{<StakingNavButton />}
{!isEthereum && (
<StakeEXAProvider>
<StakingNavButton />
</StakeEXAProvider>
)}
{!isMobile && !isEthereum && <RewardsButton />}
{isReadOnly && !impersonateActive ? <AccountInput /> : <Wallet />}
{!isMobile && <Settings />}
Expand Down
47 changes: 22 additions & 25 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import GetEXAModal from 'components/GetEXA/ModalWrapper';
import MaturityDateReminder from '../components/MaturityDateReminder';
import NewIRMBanner from '../components/NewIRMBanner';
import EXACard from 'components/ExaCard';
import { StakeEXAProvider } from 'contexts/StakeEXAContext';

dayjs.extend(isToday);
const { maxWidth } = globals;
Expand Down Expand Up @@ -89,30 +88,28 @@ export default function App({ Component, pageProps, router }: AppProps) {
<ModalContextProvider>
<GlobalErrorProvider>
<AccountDataProvider>
<StakeEXAProvider>
<NewIRMBanner />
<Box display="flex" flexDirection="column" px={2} height="100%">
<Navbar />
{router.pathname === '/strategies' && (
<Box position="relative" zIndex={-1} mx={-2}>
<Box
position="absolute"
left={0}
bgcolor={({ palette }) => (palette.mode === 'dark' ? 'grey.100' : 'figma.grey.100')}
width="100vw"
height={{ xs: 1400, sm: 440 }}
/>
</Box>
)}
<main style={{ flexGrow: 1, maxWidth, margin: '0 auto', width: '100%' }}>
<Component {...pageProps} />
</main>
<Footer />
</Box>
<Modals />
<MaturityDateReminder />
<EXACard />
</StakeEXAProvider>
<NewIRMBanner />
<Box display="flex" flexDirection="column" px={2} height="100%">
<Navbar />
{router.pathname === '/strategies' && (
<Box position="relative" zIndex={-1} mx={-2}>
<Box
position="absolute"
left={0}
bgcolor={({ palette }) => (palette.mode === 'dark' ? 'grey.100' : 'figma.grey.100')}
width="100vw"
height={{ xs: 1400, sm: 440 }}
/>
</Box>
)}
<main style={{ flexGrow: 1, maxWidth, margin: '0 auto', width: '100%' }}>
<Component {...pageProps} />
</main>
<Footer />
</Box>
<Modals />
<MaturityDateReminder />
<EXACard />
</AccountDataProvider>
</GlobalErrorProvider>
</ModalContextProvider>
Expand Down
93 changes: 48 additions & 45 deletions pages/staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,64 @@ import StakedEXASummary from 'components/staking/StakedEXASummary';
import StakingOperations from 'components/staking/StakingOperations';
import StakeChart from 'components/charts/StakeChart';
import Progress from 'components/staking/Progress';
import { StakeEXAProvider } from 'contexts/StakeEXAContext';

const Staking: NextPage = () => {
const { open: openGetEXA } = useModal('get-exa');

return (
<Box display="flex" flexDirection="column" gap={3} maxWidth={800} mx="auto" my={5}>
<Box display="flex" flexDirection="column" gap={3}>
<Box display="flex" justifyContent="space-between">
<Box display="flex" gap={1}>
<Image
src={`/img/assets/EXA.svg`}
alt={'EXA'}
width={32}
height={32}
style={{
maxWidth: '100%',
height: 'auto',
<StakeEXAProvider>
<Box display="flex" flexDirection="column" gap={3} maxWidth={800} mx="auto" my={5}>
<Box display="flex" flexDirection="column" gap={3}>
<Box display="flex" justifyContent="space-between">
<Box display="flex" gap={1}>
<Image
src={`/img/assets/EXA.svg`}
alt={'EXA'}
width={32}
height={32}
style={{
maxWidth: '100%',
height: 'auto',
}}
/>
<Typography fontSize={24} fontWeight={700}>
{t('EXA Staking')}
</Typography>
</Box>
<Button
variant="contained"
sx={{ paddingX: '40px' }}
onClick={() => {
openGetEXA();
}}
/>
<Typography fontSize={24} fontWeight={700}>
{t('EXA Staking')}
</Typography>
>
{t('Get EXA')}
</Button>
</Box>
<Button
variant="contained"
sx={{ paddingX: '40px' }}
onClick={() => {
openGetEXA();
}}
>
{t('Get EXA')}
</Button>
</Box>
<Box display="flex" flexDirection="column" gap={1}>
<Typography>
{t(
'The EXA staking period is twelve months. You can add more EXA, claim fees, or unstake anytime. Early or late withdrawal will reduce your eligible rewards. Keep your EXA staked for the entire period to receive the full treasury fees. For more information, please check ',
)}
<Typography sx={{ textDecoration: 'underline' }} component="span">
<a
target="_blank"
rel="noreferrer noopener"
href="https://docs.exact.ly/governance/exactly-token-exa/exa-staking-program-stexa"
>
{t('our docs.')}
</a>
<Box display="flex" flexDirection="column" gap={1}>
<Typography>
{t(
'The EXA staking period is twelve months. You can add more EXA, claim fees, or unstake anytime. Early or late withdrawal will reduce your eligible rewards. Keep your EXA staked for the entire period to receive the full treasury fees. For more information, please check ',
)}
<Typography sx={{ textDecoration: 'underline' }} component="span">
<a
target="_blank"
rel="noreferrer noopener"
href="https://docs.exact.ly/governance/exactly-token-exa/exa-staking-program-stexa"
>
{t('our docs.')}
</a>
</Typography>
</Typography>
</Typography>
</Box>
</Box>
<StakedEXASummary />
<StakingOperations />
<Progress />
<StakeChart />
</Box>
<StakedEXASummary />
<StakingOperations />
<Progress />
<StakeChart />
</Box>
</StakeEXAProvider>
);
};

Expand Down

0 comments on commit c28ba1c

Please sign in to comment.