Configure ts
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import fs from 'fs'
|
||||
import { readdirSync, readJsonFileSync, resolvePathname } from '../../lib/data'
|
||||
import { readdirSync, readJsonFileSync } from '../../lib/data'
|
||||
|
||||
export interface BattlesuitSkill {
|
||||
name: string
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import {
|
||||
NavLink,
|
||||
Box,
|
||||
Card,
|
||||
Heading,
|
||||
Text,
|
||||
Paragraph,
|
||||
} from '@theme-ui/components'
|
||||
import { NavLink, Box, Heading, Text, Paragraph } from '@theme-ui/components'
|
||||
import { NextPageContext } from 'next'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import {
|
||||
@@ -101,16 +95,18 @@ const StigmataListPage = ({
|
||||
|
||||
export default StigmataListPage
|
||||
|
||||
export async function getStaticProps(ctx) {
|
||||
const stigmataData = getStigmataById(ctx.params.stigmataId)
|
||||
export async function getStaticProps(
|
||||
ctx: NextPageContext & { params: { stigmataId: string } }
|
||||
) {
|
||||
const stigmataData = getStigmataById(ctx.params.stigmataId)!
|
||||
|
||||
return {
|
||||
props: {
|
||||
stigmataData: stigmataData,
|
||||
stigmataSetList: getStigmataListBySetId(stigmataData.set).sort(
|
||||
stigmataSetList: (getStigmataListBySetId(stigmataData.set!) || []).sort(
|
||||
(a, b) => -a.type.localeCompare(b.type)
|
||||
),
|
||||
stigmataSet: getStigmataSetBySetId(stigmataData.set) || null,
|
||||
stigmataSet: getStigmataSetBySetId(stigmataData.set!) || null,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @jsxImportSource theme-ui */
|
||||
import { Text, NavLink, Box, Heading, Flex, Link } from '@theme-ui/components'
|
||||
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
|
||||
import NextLink from 'next/link'
|
||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||
|
||||
Reference in New Issue
Block a user