Skip to content

Commit

Permalink
feat: add getting started to portals page
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Oct 22, 2024
1 parent 9265940 commit 2da1286
Showing 1 changed file with 46 additions and 14 deletions.
60 changes: 46 additions & 14 deletions src/pages/GatewaysPage/GatewaysPage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React, { useMemo } from 'react';
import React, { useMemo, useState } from 'react';

import { dateFormat } from '@i18n';
import { numberWithCommasFormatter, tokenFormatter } from '@lib/formatters/formatters';
import { fromSqd } from '@lib/network';
import { ExpandMore, Info } from '@mui/icons-material';
import {
Alert,
Box,
Button,
Collapse,
Divider,
IconButton,
Stack,
TableBody,
TableCell,
Expand Down Expand Up @@ -231,19 +235,8 @@ export function MyGateways() {
loading={isLoading}
title={
<>
<Stack direction="row" spacing={1.5}>
<SquaredChip label="My Portals" color="primary" />
{/* <Box pl={0.5} pr={0.5}>
<FormGroup>
<FormControlLabel
checked={isProMode}
control={<Switch size="small" onChange={() => setProMode(!isProMode)} />}
label={<Typography variant="body2">Pro mode</Typography>}
labelPlacement="end"
/>
</FormGroup>
</Box> */}
</Stack>
<SquaredChip label="My Portals" color="primary" />

<Stack direction="row" spacing={1}>
<Button color="secondary" variant="outlined">
LEARN MORE
Expand Down Expand Up @@ -295,10 +288,49 @@ export function MyGateways() {
);
}

const GettingStartedAlert = () => {
const [open, setOpen] = useState(false);

return (
<Alert
sx={{ mb: 2 }}
color="info"
icon={<Info />}
action={
<IconButton color="inherit" sx={{ padding: 0.5 }} onClick={() => setOpen(!open)}>
<ExpandMore
sx={{
transition: 'transform 300ms ease-out',
transform: open ? 'rotate(180deg)' : 'rotate(0deg)',
}}
/>
</IconButton>
}
>
<Typography>Getting started with your portal</Typography>

<Collapse in={open} unmountOnExit timeout={300}>
<Typography color="inherit" variant="body2" pt={1.5}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex,
sit amet blandit leo lobortis eget. Mauris quis nulla auctor, maximus justo eu, convallis
nisl. Morbi gravida, est et consequat convallis, felis magna consequat lectus, quis
convallis nunc nisl in justo. Nullam auctor, nunc eu convallis elementum, erat ex
facilisis nunc, quis facilisis nisl nunc nec leo. Nullam scelerisque, sapien nec tincidunt
elementum, erat ex facilisis nunc, quis facilisis nisl nunc nec leo. Nullam scelerisque,
sapien nec tincidunt elementum, erat ex facilisis nunc, quis facilisis nisl nunc nec leo.
Nullam scelerisque, sapien nec tincidunt elementum, erat ex facilisis nunc, quis facilisis
nisl nunc nec leo.
</Typography>
</Collapse>
</Alert>
);
};

export function GatewaysPage() {
return (
<CenteredPageWrapper className="wide">
<ConnectedWalletRequired>
<GettingStartedAlert />
<MyStakes />
<MyGateways />
</ConnectedWalletRequired>
Expand Down

0 comments on commit 2da1286

Please sign in to comment.