Skip to content

Commit 0328b51

Browse files
committed
Adjust Pontus-X dashboard
- Hide the Tokens card - Tune TX list size
1 parent 0a30ad3 commit 0328b51

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/app/pages/ParatimeDashboardPage/LatestRuntimeTransactions.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import { Link as RouterLink } from 'react-router-dom'
77
import Link from '@mui/material/Link'
88
import { Layer, useGetRuntimeTransactions } from '../../../oasis-nexus/api'
99
import { RuntimeTransactions } from '../../components/Transactions'
10-
import { NUMBER_OF_ITEMS_ON_DASHBOARD } from '../../config'
1110
import { COLORS } from '../../../styles/theme/colors'
1211
import { AppErrors } from '../../../types/errors'
1312
import { RouteUtils } from '../../utils/route-utils'
1413
import { useScreenSize } from '../../hooks/useScreensize'
1514
import { SearchScope } from '../../../types/searchScope'
1615

17-
const limit = NUMBER_OF_ITEMS_ON_DASHBOARD
16+
const limit = 15 // NUMBER_OF_ITEMS_ON_DASHBOARD
1817

1918
export const LatestRuntimeTransactions: FC<{ scope: SearchScope }> = ({ scope }) => {
2019
const { isTablet } = useScreenSize()

src/app/pages/ParatimeDashboardPage/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ import { PageLayout } from '../../components/PageLayout'
1212
import { ParaTimeSnapshot } from './ParaTimeSnapshot'
1313
import { TopTokens } from './TopTokens'
1414
import { useRequiredScopeParam } from '../../hooks/useScopeParam'
15+
import { paraTimesConfig } from '../../../config'
1516

1617
export const ParatimeDashboardPage: FC = () => {
1718
const { isMobile } = useScreenSize()
1819
const scope = useRequiredScopeParam()
1920

21+
const { hideTokensFromDashboard } = paraTimesConfig[scope.layer]!
22+
2023
return (
2124
<PageLayout>
2225
<ParaTimeSnapshot scope={scope} />
@@ -35,7 +38,7 @@ export const ParatimeDashboardPage: FC = () => {
3538
</Grid>
3639
)}
3740
</Grid>
38-
{!isMobile && <TopTokens scope={scope} />}
41+
{!hideTokensFromDashboard && !isMobile && <TopTokens scope={scope} />}
3942
<TransactionsStats scope={scope} />
4043
<TotalTransactions scope={scope} />
4144
<Social />

src/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ type LayerConfig = {
3838
* Specified in milliseconds.
3939
*/
4040
outOfDateThreshold: number
41+
42+
hideTokensFromDashboard?: boolean
4143
}
4244

4345
export enum RuntimeTypes {
@@ -148,6 +150,7 @@ const pontusxConfig: LayerConfig = {
148150
decimals: 18,
149151
type: RuntimeTypes.Evm,
150152
outOfDateThreshold: 2 * 60 * 1000,
153+
hideTokensFromDashboard: true,
151154
}
152155

153156
type LayersConfig = {

0 commit comments

Comments
 (0)