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