-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: new treasury upload * feat: update * feat: last chart * fix visual details * fix: small fixes * fix: new icons * fix: default coin icon * fix: smaller icons * fix: hide pagination * fix: remove old icons * fix: remove filter button Co-authored-by: Alexis Munoz <alexismn86@gmail.com>
- Loading branch information
1 parent
188b62c
commit 8c46139
Showing
24 changed files
with
1,074 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ yarn-error.log* | |
.vercel | ||
|
||
**/sitemap.xml | ||
.vscode/settings.json |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pkg/app/src/components/TabPanels/Treasury/modules/asset.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// libs | ||
import { Stack, Paper, Box, Typography } from '@mui/material' | ||
import { useTheme } from '@mui/material/styles' | ||
|
||
interface ComponentProps { | ||
name: string | ||
quantity: number | ||
image: string | ||
} | ||
|
||
export function Asset({ name, quantity, image }: ComponentProps) { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Stack component={Paper} padding={4} spacing={6} sx={{ boxShadow: 'none', textAlign: 'center' }}> | ||
<Box mb={2}> | ||
<img src={`/svg/coins/${image}.svg`} style={{ margin: 'auto', height: '40px' }} /> | ||
</Box> | ||
<Box style={{ marginTop: 0 }}> | ||
<Typography variant="h6">{quantity.toLocaleString()}</Typography> | ||
</Box> | ||
<Box style={{ marginTop: 0 }}> | ||
<Typography variant="caption" sx={{ fontWeight: 'bold', color: theme.palette.text.primary }}> | ||
{name} | ||
</Typography> | ||
</Box> | ||
</Stack> | ||
) | ||
} |
40 changes: 40 additions & 0 deletions
40
pkg/app/src/components/TabPanels/Treasury/modules/assets.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// libs | ||
import { Grid, Box, Typography } from '@mui/material' | ||
import { useTranslation } from 'react-i18next' | ||
import React, { useState, useMemo, useEffect } from 'react' | ||
|
||
// Subscriptions | ||
import { getAssetsSubscription, TreasuryAsset } from '../modules/mock-data' | ||
|
||
// modules | ||
import { Asset } from './asset' | ||
|
||
interface ComponentProps { | ||
address: string | ||
} | ||
|
||
export function Assets({ address }: ComponentProps) { | ||
const { t } = useTranslation() | ||
|
||
const [assetsData, setAssetsData] = useState<TreasuryAsset[]>([]) | ||
|
||
useEffect(() => { | ||
const data = getAssetsSubscription() | ||
setAssetsData(data) | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<Box py={3}> | ||
<Typography variant="h5">{t('page:organisations:treasury:assets')}</Typography> | ||
</Box> | ||
<Grid container spacing={3}> | ||
{assetsData.map(({ name, quantity, image }) => ( | ||
<Grid item xs={3} key={name}> | ||
<Asset name={name} quantity={quantity} image={image}></Asset> | ||
</Grid> | ||
))} | ||
</Grid> | ||
</> | ||
) | ||
} |
35 changes: 35 additions & 0 deletions
35
pkg/app/src/components/TabPanels/Treasury/modules/chartLabel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// libs | ||
import { Grid, Typography, Box } from '@mui/material' | ||
import React from 'react' | ||
import { useTheme } from '@mui/material/styles' | ||
|
||
interface ComponentProps { | ||
name: string | ||
color: string | ||
} | ||
|
||
export function ChartLabel({ name, color }: ComponentProps) { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Grid container> | ||
<Grid item xs={3}> | ||
<Box | ||
sx={{ | ||
marginTop: '4px', | ||
backgroundColor: color, | ||
borderRadius: '50%', | ||
width: '15px', | ||
height: '15px', | ||
marginRight: 0, | ||
}} | ||
/> | ||
</Grid> | ||
<Grid item xs={9}> | ||
<Typography variant="caption" sx={{ fontWeight: 'bold', color: theme.palette.text.primary }}> | ||
{name} | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
) | ||
} |
Oops, something went wrong.