documents page meta
This commit is contained in:
1 parent
f2802c87a8
commit
5708f778c7
1 file changed
+9
-2
+9
-2
@@ -2,8 +2,10 @@ import React from 'react'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import App from '../src/components/App'
|
import App from '../src/components/App'
|
||||||
|
import { Meta } from '../src/components/Meta'
|
||||||
import menuModel from '../src/models/menu'
|
import menuModel from '../src/models/menu'
|
||||||
import { buildMenu } from '../src/lib/menu'
|
import { buildMenu } from '../src/lib/menu'
|
||||||
|
import { meta } from '../src/lib/meta'
|
||||||
|
|
||||||
import DocumentList from '../src/components/DocumentList'
|
import DocumentList from '../src/components/DocumentList'
|
||||||
import ImageArtifactType from '../src/core/ImageArtifactType'
|
import ImageArtifactType from '../src/core/ImageArtifactType'
|
||||||
@@ -106,6 +108,7 @@ const Page = (props) => (
|
|||||||
>
|
>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{props.title}</title>
|
<title>{props.title}</title>
|
||||||
|
<Meta meta={props.meta} />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="content content_thin">
|
<div className="content content_thin">
|
||||||
@@ -127,13 +130,17 @@ Page.getInitialProps = async (ctx) => {
|
|||||||
const apiUrl = `http://localhost:3000/api/files`
|
const apiUrl = `http://localhost:3000/api/files`
|
||||||
const res = await axios.get(apiUrl)
|
const res = await axios.get(apiUrl)
|
||||||
const files = res.data.items
|
const files = res.data.items
|
||||||
|
const title = 'Документы'
|
||||||
const collections = getSorted(files)
|
const collections = getSorted(files)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
collections,
|
collections,
|
||||||
pageUrl,
|
pageUrl,
|
||||||
title: 'Документы',
|
title,
|
||||||
|
meta: meta({
|
||||||
|
title,
|
||||||
|
description: 'Документы Шлиссельбургской ДХШ',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user