Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Dec 7, 2023
1 parent 0a39b83 commit 4564c90
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import classNames from 'classnames';
import Big from 'big.js';
import styles from './JobStatistics.module.sass';
import { ChartContainer } from 'components/chart-container';
import { useMemo } from 'react';
import { useChainSelector } from '@terra-money/apps/hooks';

const JOB_COUNT_OFFSET = 4823;

Expand All @@ -16,6 +18,16 @@ export const JobsStatistics = (props: UIElementProps) => {

const average = values.length === 0 ? 0 : Big(total).div(values.length);

const { selectedChain } = useChainSelector();

const jobCountOffset = useMemo(() => {
if (selectedChain.name === 'terra') {
return JOB_COUNT_OFFSET;
}

return 0;
}, [selectedChain]);

return (
<Container className={classNames(styles.root, className)} direction="column">
<ChartContainer
Expand All @@ -29,7 +41,7 @@ export const JobsStatistics = (props: UIElementProps) => {
})
}
>
{total.add(JOB_COUNT_OFFSET)}
{total.add(jobCountOffset)}
</AnimateNumber>
}
/>
Expand Down

0 comments on commit 4564c90

Please sign in to comment.