updated to next 9.3.0
This commit is contained in:
1 parent
6c6c9f91ca
commit
01acda1e04
8 files changed
+478
-217
No files matched your search
+3
-2
@@ -47,7 +47,7 @@ const Index: NextPage<Props> = props => (
|
||||
</App>
|
||||
)
|
||||
|
||||
export const unstable_getStaticProps = async (ctx: any) => {
|
||||
export const getStaticProps = async (ctx: any) => {
|
||||
let slug = null
|
||||
if (ctx.query) {
|
||||
slug = '/' + array(ctx.query.slug).join('/')
|
||||
@@ -79,13 +79,14 @@ export const unstable_getStaticProps = async (ctx: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const unstable_getStaticPaths = async () => {
|
||||
export const getStaticPaths = async () => {
|
||||
const urls = await requestGet<IResponseItems<string>>(createApiUrl(`/api/pages/urls`), null)
|
||||
if (!urls) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
fallback: true,
|
||||
paths: urls.items
|
||||
.map(path => {
|
||||
const slug = tail(path.split('/'))
|
||||
|
||||
Reference in new issue
Block a user