Skip to content

Commit

Permalink
Adjust Pontus-X dashboard
Browse files Browse the repository at this point in the history
- Hide the Tokens card
- Tune TX list size
  • Loading branch information
csillag committed Feb 28, 2024
1 parent 14faeff commit 3deb614
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import { Link as RouterLink } from 'react-router-dom'
import Link from '@mui/material/Link'
import { Layer, useGetRuntimeTransactions } from '../../../oasis-nexus/api'
import { RuntimeTransactions } from '../../components/Transactions'
import { NUMBER_OF_ITEMS_ON_DASHBOARD } from '../../config'
import { COLORS } from '../../../styles/theme/colors'
import { AppErrors } from '../../../types/errors'
import { RouteUtils } from '../../utils/route-utils'
import { useScreenSize } from '../../hooks/useScreensize'
import { SearchScope } from '../../../types/searchScope'

const limit = NUMBER_OF_ITEMS_ON_DASHBOARD
const limit = 15 // NUMBER_OF_ITEMS_ON_DASHBOARD

export const LatestRuntimeTransactions: FC<{ scope: SearchScope }> = ({ scope }) => {
const { isTablet } = useScreenSize()
Expand Down
5 changes: 4 additions & 1 deletion src/app/pages/ParatimeDashboardPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import { PageLayout } from '../../components/PageLayout'
import { ParaTimeSnapshot } from './ParaTimeSnapshot'
import { TopTokens } from './TopTokens'
import { useRequiredScopeParam } from '../../hooks/useScopeParam'
import { paraTimesConfig } from '../../../config'

export const ParatimeDashboardPage: FC = () => {
const { isMobile } = useScreenSize()
const scope = useRequiredScopeParam()

const { hideTokensFromDashboard } = paraTimesConfig[scope.layer]!

return (
<PageLayout>
<ParaTimeSnapshot scope={scope} />
Expand All @@ -35,7 +38,7 @@ export const ParatimeDashboardPage: FC = () => {
</Grid>
)}
</Grid>
{!isMobile && <TopTokens scope={scope} />}
{!hideTokensFromDashboard && !isMobile && <TopTokens scope={scope} />}
<TransactionsStats scope={scope} />
<TotalTransactions scope={scope} />
<Social />
Expand Down
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type LayerConfig = {
* Specified in milliseconds.
*/
outOfDateThreshold: number

hideTokensFromDashboard?: boolean
}

export enum RuntimeTypes {
Expand Down Expand Up @@ -148,6 +150,7 @@ const pontusxConfig: LayerConfig = {
decimals: 18,
type: RuntimeTypes.Evm,
outOfDateThreshold: 2 * 60 * 1000,
hideTokensFromDashboard: true,
}

type LayersConfig = {
Expand Down

0 comments on commit 3deb614

Please sign in to comment.