Update static paths for i18n
This commit is contained in:
@@ -23,7 +23,7 @@ import ChibiIcon from '../../../components/v2/ChibiIcon'
|
||||
import WeaponTypeIcon from '../../../components/v2/WeaponTypeIcon'
|
||||
import { sortBattlesuitSkill } from '../../../lib/v2/data/utils'
|
||||
import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
|
||||
@@ -176,11 +176,13 @@ export async function getStaticPaths() {
|
||||
const battlesuitCatalog = loadBattlesuitCatalog()
|
||||
|
||||
return {
|
||||
paths: battlesuitCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
battlesuitCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { battlesuitId: catalogItem.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
|
||||
interface ElfShowPageProps {
|
||||
elf: Elf
|
||||
@@ -139,11 +139,13 @@ export async function getStaticPaths() {
|
||||
const elfCatalog = loadElfCatalog()
|
||||
|
||||
return {
|
||||
paths: elfCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
elfCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { elfId: catalogItem.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Breadcrumb from '../../../../components/organisms/Breadcrumb'
|
||||
import { getI18NProps } from '../../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../../server/i18n'
|
||||
|
||||
interface BattlesuitShowPageProps {
|
||||
battlesuit: Battlesuit
|
||||
@@ -145,11 +145,13 @@ export async function getStaticPaths() {
|
||||
const battlesuitCatalog = loadErBattlesuitCatalog()
|
||||
|
||||
return {
|
||||
paths: battlesuitCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
battlesuitCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { battlesuitId: catalogItem.battlesuit }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Breadcrumb from '../../../../components/organisms/Breadcrumb'
|
||||
import { getI18NProps } from '../../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../../server/i18n'
|
||||
|
||||
interface BattlesuitShowPageProps {
|
||||
group: ErSignetGroup
|
||||
@@ -110,11 +110,13 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: signetGroups.map(group => {
|
||||
paths: generateI18NPaths(
|
||||
signetGroups.map(group => {
|
||||
return {
|
||||
params: { groupId: group.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import StigmaFigureImage from '../../../components/v2/StigmaFigureImage'
|
||||
import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||
import PageLink from '../../../components/atoms/PageLink'
|
||||
|
||||
@@ -205,11 +205,13 @@ export async function getStaticPaths() {
|
||||
const stigmataSetCatalog = loadStigmataSetCatalog()
|
||||
|
||||
return {
|
||||
paths: stigmataSetCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
stigmataSetCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { stigmataSetId: catalogItem.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { getStigmaTypeLabel } from '../../../lib/v2/data/text'
|
||||
import StigmaTypeIcon from '../../../components/v2/StigmaTypeIcon'
|
||||
import StigmaIcon from '../../../components/v2/StigmaIcon'
|
||||
import StigmaFigureImage from '../../../components/v2/StigmaFigureImage'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
@@ -188,11 +188,13 @@ export async function getStaticPaths() {
|
||||
const stigmataCatalog = loadStigmataCatalog()
|
||||
|
||||
return {
|
||||
paths: stigmataCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
stigmataCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { stigmaId: catalogItem.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import WeaponIcon from '../../../components/v2/WeaponIcon'
|
||||
import Honkai3rdLayout from '../../../components/layouts/Honkai3rdLayout'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||
|
||||
interface WeaponShowPageProps {
|
||||
@@ -123,11 +123,13 @@ export async function getStaticPaths() {
|
||||
const weaponCatalog = loadWeaponCatalog()
|
||||
|
||||
return {
|
||||
paths: weaponCatalog.map(catalogItem => {
|
||||
paths: generateI18NPaths(
|
||||
weaponCatalog.map(catalogItem => {
|
||||
return {
|
||||
params: { weaponId: catalogItem.id }
|
||||
}
|
||||
}),
|
||||
})
|
||||
),
|
||||
fallback: false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user