update static paths
This commit is contained in:
parent
e15305aae6
commit
bb8b7a35bb
|
@ -1,7 +1,7 @@
|
||||||
import Change from '@components/shared/Change'
|
import Change from '@components/shared/Change'
|
||||||
import DailyRange from '@components/shared/DailyRange'
|
import DailyRange from '@components/shared/DailyRange'
|
||||||
import mangoStore from '@store/mangoStore'
|
import mangoStore from '@store/mangoStore'
|
||||||
import type { GetStaticPaths, NextPage } from 'next'
|
import type { NextPage } from 'next'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
@ -21,6 +21,7 @@ import SheenLoader from '@components/shared/SheenLoader'
|
||||||
import Tooltip from '@components/shared/Tooltip'
|
import Tooltip from '@components/shared/Tooltip'
|
||||||
import ChartRangeButtons from '@components/shared/ChartRangeButtons'
|
import ChartRangeButtons from '@components/shared/ChartRangeButtons'
|
||||||
import dynamic from 'next/dynamic'
|
import dynamic from 'next/dynamic'
|
||||||
|
import { LISTED_TOKENS } from 'utils/tokens'
|
||||||
const PriceChart = dynamic(() => import('@components/token/PriceChart'), {
|
const PriceChart = dynamic(() => import('@components/token/PriceChart'), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
})
|
})
|
||||||
|
@ -34,11 +35,12 @@ export async function getStaticProps({ locale }: { locale: string }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getStaticPaths: GetStaticPaths<{ slug: string }> = async () => {
|
export const getStaticPaths = async () => {
|
||||||
return {
|
const paths = LISTED_TOKENS.map((token) => ({
|
||||||
paths: [],
|
params: { token: token },
|
||||||
fallback: 'blocking',
|
}))
|
||||||
}
|
|
||||||
|
return { paths, fallback: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_COINGECKO_VALUES = {
|
const DEFAULT_COINGECKO_VALUES = {
|
||||||
|
|
|
@ -105,3 +105,13 @@ export const fetchNftsFromHolaplexIndexer = async (owner: PublicKey) => {
|
||||||
|
|
||||||
export const formatTokenSymbol = (symbol: string) =>
|
export const formatTokenSymbol = (symbol: string) =>
|
||||||
symbol === 'MSOL' ? 'mSOL' : symbol === 'SOETH' ? 'soETH' : symbol
|
symbol === 'MSOL' ? 'mSOL' : symbol === 'SOETH' ? 'soETH' : symbol
|
||||||
|
|
||||||
|
export const LISTED_TOKENS: string[] = [
|
||||||
|
'BTC',
|
||||||
|
'ETH',
|
||||||
|
'soETH',
|
||||||
|
'SOL',
|
||||||
|
'mSOL',
|
||||||
|
'USDC',
|
||||||
|
'USDT',
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue