next page cleanup
This commit is contained in:
1 parent
436b58cede
commit
4e076b787e
1 file changed
+2
-3
+2
-3
@@ -9,7 +9,7 @@ import { Meta } from '../src/components/Meta'
|
|||||||
import { meta } from '../src/lib/meta'
|
import { meta } from '../src/lib/meta'
|
||||||
import { createApiUrl, requestGet, wrapInitialProps } from '../src/next-lib'
|
import { createApiUrl, requestGet, wrapInitialProps } from '../src/next-lib'
|
||||||
|
|
||||||
const Index = (props) => (
|
const Index = props => (
|
||||||
<App
|
<App
|
||||||
menu={buildMenu(props.pageUrl, menuModel)}
|
menu={buildMenu(props.pageUrl, menuModel)}
|
||||||
showAuthor={true}
|
showAuthor={true}
|
||||||
@@ -31,7 +31,6 @@ const Index = (props) => (
|
|||||||
|
|
||||||
Index.getInitialProps = wrapInitialProps(async (ctx) => {
|
Index.getInitialProps = wrapInitialProps(async (ctx) => {
|
||||||
const pageUrl = ctx.req.url
|
const pageUrl = ctx.req.url
|
||||||
// // const pageUrl = '/neighbors/2018'
|
|
||||||
const page = await requestGet(createApiUrl(ctx.req, `/api/page?page=${pageUrl}`), {})
|
const page = await requestGet(createApiUrl(ctx.req, `/api/page?page=${pageUrl}`), {})
|
||||||
const image = page.preview ? page.preview.artifacts.fb : {}
|
const image = page.preview ? page.preview.artifacts.fb : {}
|
||||||
|
|
||||||
@@ -48,4 +47,4 @@ Index.getInitialProps = wrapInitialProps(async (ctx) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export default Index
|
export default Index
|
||||||
Reference in new issue
Block a user