export const ItemDetailPage = (props: any) => { return <div>{props.data.item_code} : {props.data.item_name}</div> } export const getStaticProps = async ({ params }: any) => { const data = await getPost(params.id) return { props: { data: data }, revalidate: 30 } } export const getStaticPaths = async () => { const list = (await getPosts()) || [] const paths = list.map((_data: any) => { return { para