Skip to content

Commit

Permalink
added commas to leaderboard points
Browse files Browse the repository at this point in the history
  • Loading branch information
ametel01 committed Feb 4, 2024
1 parent 28ee9ba commit d4d3ee1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from 'styled-components';
import CircularProgress from '@mui/material/CircularProgress';
import { CenteredProgress } from './LeaderBoardMain';
import { formatAccount } from '../../shared/utils';
import { numberWithCommas } from '../../shared/utils/index';

const Table = styled.table`
width: 100%;
Expand Down Expand Up @@ -121,7 +122,9 @@ const LeadearBoardFleet = ({ planetId }: Props) => {
: 'Unknown Account'}
</Data>
<Data>{entry.planet_id}</Data>
<Data>{Math.round(Number(entry.net_amount) / 1000)}</Data>
<Data>
{numberWithCommas(Math.round(Number(entry.net_amount) / 1000))}
</Data>
</Row>
))}
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
import CircularProgress from '@mui/material/CircularProgress';
import { formatAccount } from '../../shared/utils';
import { formatAccount, numberWithCommas } from '../../shared/utils';

const Table = styled.table`
width: 100%;
Expand Down Expand Up @@ -128,7 +128,9 @@ const LeadearBoardMain = ({ planetId }: Props) => {
: 'Unknown Account'}
</Data>
<Data>{entry.planet_id}</Data>
<Data>{Math.round(Number(entry.net_amount) / 1000)}</Data>
<Data>
{numberWithCommas(Math.round(Number(entry.net_amount) / 1000))}
</Data>
</Row>
))}
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from 'styled-components';
import CircularProgress from '@mui/material/CircularProgress';
import { CenteredProgress } from './LeaderBoardMain';
import { formatAccount } from '../../shared/utils';
import { numberWithCommas } from '../../shared/utils/index';

const Table = styled.table`
width: 100%;
Expand Down Expand Up @@ -121,7 +122,9 @@ const LeadearBoardTech = ({ planetId }: Props) => {
: 'Unknown Account'}
</Data>
<Data>{entry.planet_id}</Data>
<Data>{Math.round(Number(entry.total_spent) / 1000)}</Data>
<Data>
{numberWithCommas(Math.round(Number(entry.total_spent) / 1000))}
</Data>
</Row>
))}
</tbody>
Expand Down

0 comments on commit d4d3ee1

Please sign in to comment.