Skip to content

Commit

Permalink
Merge pull request #179 from pastelnetwork/feature/update-foundation-…
Browse files Browse the repository at this point in the history
…number-and-footer

Update foundation number and footer
  • Loading branch information
Dicklesworthstone authored Jan 4, 2023
2 parents 464de2f + 6caa287 commit 68e5e0f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Footer: React.FC = () => {
<Hidden xsDown implementation="css">
<Styles.GridStyle item>
<Styles.Typography>
Copyright © {getYear(currentDate)} Pastel. All rights reserved
Copyright © {getYear(currentDate)} Pastel Network. All rights reserved.
</Styles.Typography>
</Styles.GridStyle>
</Hidden>
Expand Down
19 changes: 15 additions & 4 deletions src/components/Summary/Summary.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';

import { Skeleton } from '@material-ui/lab';
import { makeStyles } from '@material-ui/styles';
import { withStyles, makeStyles } from '@material-ui/styles';
import { useDispatch } from 'react-redux';
import { useLocation } from 'react-router-dom';
import Tooltip from '@material-ui/core/Tooltip';
Expand Down Expand Up @@ -54,6 +54,15 @@ type TChartDataProps = {
offset: number;
};

const CustomTooltip = withStyles(theme => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: '#4A5568',
boxShadow: theme.shadows[2],
fontSize: 12,
},
}))(Tooltip);

const Summary: React.FC = () => {
const [summaryList, setSummaryList] = React.useState(initialSummaryList);
const [currentStatsData, setCurrentStatsData] = React.useState<ISummaryStats | null>(null);
Expand Down Expand Up @@ -241,7 +250,7 @@ const Summary: React.FC = () => {
const theNumberOfTotalSupernodes = getCurrencyName() === 'PSL' ? 5000000 : 1000000;
const totalLockedInSupernodes = totalSupernode * theNumberOfTotalSupernodes;
return (
<Tooltip
<CustomTooltip
title={
<Box>
{sumKey === 'coinSupply' ? (
Expand All @@ -264,15 +273,17 @@ const Summary: React.FC = () => {
<Box>Less PSL Staked by SuperNodes: {formatNumber(totalLockedInSupernodes)}</Box>
<Box>
Less PSL Locked by Foundation:{' '}
{formatNumber(9384556240.23, { decimalsLength: 0 })}
{formatNumber(currentStatsData?.pslLockedByFoundation || 0, {
decimalsLength: 0,
})}
</Box>
</>
)}
</Box>
}
>
<Box>{value}</Box>
</Tooltip>
</CustomTooltip>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/theme/shadows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function createShadow() {
const shadows: Shadows = [
'none',
createShadow(),
createShadow(),
'rgb(0 0 0 / 20%) 1px 2px 10px',
createShadow(),
createShadow(),
createShadow(),
Expand Down
1 change: 1 addition & 0 deletions src/utils/types/ISummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ISummaryStats {
percentPSLStaked: number;
totalBurnedPSL: number;
totalCoinSupply: number;
pslLockedByFoundation: number;
}

export type TSummaryChartProps = {
Expand Down

0 comments on commit 68e5e0f

Please sign in to comment.