forked from sushiswap/sushiswap-analytics
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability for tokens to add token information
- Loading branch information
Showing
6 changed files
with
229 additions
and
0 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
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,54 @@ | ||
import { Box, Card, CardContent, Grid, Typography } from "@material-ui/core"; | ||
|
||
import React from "react"; | ||
import clsx from "clsx"; | ||
import { formatCurrency, TokenInfo } from "app/core"; | ||
import { makeStyles } from "@material-ui/styles"; | ||
|
||
const useStyles = makeStyles((theme) => ({ | ||
cardContent: { | ||
// textAlign: "center", | ||
"&:last-child": { | ||
paddingBottom: 16, | ||
}, | ||
}, | ||
title: { | ||
fontWeight: 500, | ||
}, | ||
content: { | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "flex-start", | ||
}, | ||
})); | ||
|
||
function TokenDetail({ | ||
className, | ||
title = "", | ||
value = "", | ||
format = "none", | ||
...rest | ||
}) { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<Card variant="outlined"> | ||
<CardContent className={classes.cardContent}> | ||
<Typography | ||
variant="subtitle2" | ||
color="textSecondary" | ||
gutterBottom | ||
noWrap | ||
className={classes.title} | ||
> | ||
{ title } | ||
</Typography> | ||
<div className={classes.content}> | ||
{ value } | ||
</div> | ||
</CardContent> | ||
</Card> | ||
); | ||
} | ||
|
||
export default TokenDetail; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export const TokenInfo = { | ||
"COPY_THIS_AND_REPLACE_WITH_LOWERCASE_CONTRACT_ADDRESS": { | ||
description: 'Copy this entire section and add to end of list, keeping the trailing comma. Any unused fields may be set to null. Do not leave any example values.', | ||
discord: 'tokenchat', | ||
docs: 'https://docs.token.com', | ||
github: 'tokendev', | ||
gitlab: 'tokendev', | ||
telegram: 'tokenchat', | ||
twitter: 'token_news', | ||
website: 'https://token.com', | ||
whitepaper: 'https://token.com/whitepaper.pdf', | ||
}, | ||
"0x5fa664f69c2a4a3ec94fac3cbf7049bd9ca73129": { | ||
description: 'Mist is the native token of the MistSwap protocol.', | ||
discord: 'mistswapdex', | ||
docs: 'https://docs.mistswap.fi', | ||
github: 'mistswapdex', | ||
gitlab: null, | ||
telegram: 'MistSwapOfficial', | ||
twitter: 'mistswapdex', | ||
website: 'https://mistswap.fi', | ||
whitepaper: null, | ||
}, | ||
} |
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
5a3ed4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: