person page rm debugging code

This commit is contained in:
tmshv committed 2020-02-24 00:28:52 +03:00
1 parent 88d5a56fec
commit 3f8941b613
1 file changed
+1 -9
+1 -9
View File
@@ -47,12 +47,7 @@ const Index: NextPage<IProps> = props => {
} }
export const unstable_getStaticProps = async (ctx: any) => { export const unstable_getStaticProps = async (ctx: any) => {
console.log('call unstable_getStaticProps', ctx) const id = ctx.params.person
// const id = ctx.query.person
// const id = ctx.params.person ?? 'va-sarzhin'
const id = ctx.params.person //?? 'mg-timasheva'
if (!id) { if (!id) {
throw new Error('sry') throw new Error('sry')
} }
@@ -88,10 +83,7 @@ export const unstable_getStaticProps = async (ctx: any) => {
} }
export const unstable_getStaticPaths = async () => { export const unstable_getStaticPaths = async () => {
console.log('call unstable_getStaticPaths')
const urls = await requestGet<IResponseItems<string>>(createApiUrl(`/api/persons/urls`), null) const urls = await requestGet<IResponseItems<string>>(createApiUrl(`/api/persons/urls`), null)
// const urls = {items: ['/teacher/va-sarzhin']}
return { return {
paths: urls.items paths: urls.items