Unverified Commit ea026151 authored by Kim T's avatar Kim T Committed by GitHub

with-electron-typescript build error fix (#15803)

Fixes #15802 

Added Params type to prevent typescript error during build step
parent 60f1d58c
......@@ -5,6 +5,10 @@ import { findAll, findData } from '../../utils/sample-api'
import ListDetail from '../../components/ListDetail'
import { GetStaticPaths, GetStaticProps } from 'next'
type Params = {
id?: string
}
type Props = {
item?: User
errors?: string
......@@ -37,7 +41,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
}
export const getStaticProps: GetStaticProps = async ({ params }) => {
const { id } = params
const { id } = params as Params
try {
const item = await findData(Array.isArray(id) ? id[0] : id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment