Update [id].tsx

This commit is contained in:
qwertyforce 2020-09-25 11:08:30 +03:00
parent b43c9e5721
commit 5f442d117e

View File

@ -105,7 +105,7 @@ export default function Image(props: any) {
export const getStaticProps: GetStaticProps = async (context) => { export const getStaticProps: GetStaticProps = async (context) => {
if (context.params) { if (context.params.id) {
const img = await db_ops.image_ops.find_image_by_id(parseInt((context.params.id as string))) const img = await db_ops.image_ops.find_image_by_id(parseInt((context.params.id as string)))
if (img.length === 1) { if (img.length === 1) {
const date = new Date(img[0].created_at) const date = new Date(img[0].created_at)