updated to next 9.3.0

This commit is contained in:
tmshv committed 2020-03-10 19:13:11 +03:00
1 parent 6c6c9f91ca
commit 01acda1e04
8 files changed
+478 -217

No files matched your search

+3 -2
View File
@@ -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('/'))