person page rm debugging code
This commit is contained in:
1 parent
88d5a56fec
commit
3f8941b613
1 file changed
+1
-9
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user