forked from aave/interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkets.page.tsx
More file actions
71 lines (64 loc) · 1.59 KB
/
markets.page.tsx
File metadata and controls
71 lines (64 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { Box, Container } from '@mui/material';
import { ReactNode, useEffect } from 'react';
import { MainLayout } from 'src/layouts/MainLayout';
import { MarketAssetsListContainer } from 'src/modules/markets/MarketAssetsListContainer';
import { MarketsTopPanel } from 'src/modules/markets/MarketsTopPanel';
import { useRootStore } from 'src/store/root';
interface MarketContainerProps {
children: ReactNode;
}
export const marketContainerProps = {
sx: {
display: 'flex',
flexDirection: 'column',
flex: 1,
pb: '39px',
px: {
xs: 2,
xsm: 5,
sm: 12,
md: 5,
lg: 0,
xl: '96px',
xxl: 0,
},
maxWidth: {
xs: 'unset',
lg: '1240px',
xl: 'unset',
xxl: '1440px',
},
},
};
export const MarketContainer = ({ children }: MarketContainerProps) => {
return <Container {...marketContainerProps}>{children}</Container>;
};
export default function Markets() {
const trackEvent = useRootStore((store) => store.trackEvent);
useEffect(() => {
trackEvent('Page Viewed', {
'Page Name': 'Markets',
});
}, [trackEvent]);
return (
<>
<MarketsTopPanel />
<Box
sx={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
flex: 1,
mt: { xs: '-32px', lg: '-46px', xl: '-44px', xxl: '-48px' },
}}
>
<MarketContainer>
<MarketAssetsListContainer />
</MarketContainer>
</Box>
</>
);
}
Markets.getLayout = function getLayout(page: React.ReactElement) {
return <MainLayout>{page}</MainLayout>;
};