From cdeece2b0bd7ec0da405dcc071884b4a61c0ceb8 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 24 Feb 2020 02:27:52 +0300 Subject: [PATCH] person page cleanup --- pages/teacher/[person].tsx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/pages/teacher/[person].tsx b/pages/teacher/[person].tsx index 8cd36744..edfb04eb 100644 --- a/pages/teacher/[person].tsx +++ b/pages/teacher/[person].tsx @@ -5,25 +5,9 @@ import { Meta } from 'src/components/Meta' import { MetaBuilder } from 'src/lib/meta' import { createApiUrl, requestGet, IResponseItems } from 'src/next-lib' import { NextPage } from 'next' -import { IMeta, ImageArtifact, ImageDefinition } from 'src/types' +import { IMeta, Person } from 'src/types' import { Html } from 'src/components/Html' -type Person = { - id: string - position: string - name: [string, string, string] - post: string - diploma: string - edu: string - file: string - hash: string - shortName: string - status: string - url: string - picture: ImageArtifact - preview: ImageDefinition -} - interface IProps { title: string meta: IMeta @@ -63,7 +47,7 @@ const Index: NextPage = props => { } export const unstable_getStaticProps = async (ctx: any) => { - const id = ctx.params.person + const id = ctx.params.person if (!id) { throw new Error('sry') }