diff --git a/pages/teacher/[person].jsx b/pages/teacher/[person].jsx index f0461d8e..9210b0f6 100644 --- a/pages/teacher/[person].jsx +++ b/pages/teacher/[person].jsx @@ -1,5 +1,6 @@ import React from 'react' import axios from 'axios' +import Head from 'next/head' import App from '../../src/components/App' import Page from '../../src/components/Page' import menuModel from '../../src/models/menu' @@ -11,6 +12,9 @@ const Index = (props) => ( showAuthor={true} menuPadding={true} > + + {props.title} +
{props.person.post} @@ -25,10 +29,12 @@ Index.getInitialProps = async (ctx) => { const apiUrl = `http://localhost:3000/api/persons/${id}` const res = await axios.get(apiUrl) const person = res.data + const name = person.name || [] return { pageUrl, person, + title: name.join(' ') } }