function PageTitle(props) {
  const { activePage } = React.useContext(PageContext);

  if (!activePage) {
    throw new Error('Missing activePage.');
  }

  const title = pageToTitleI18n(activePage, props.t);

  return props.children(title);
}
function PageTitle(props) {
  const { activePage } = React.useContext(PageContext);

  if (!activePage) {
    throw new Error('Missing activePage.');
  }

  const title = pageToTitleI18n(activePage, props.t);

  return props.children(title);
}
function PageTitle ( props ) { const { activePage } = React . useContext ( PageContext ) ; if ( ! activePage ) { throw new Error ( 'Missing activePage.' ) ; } const title = pageToTitleI18n ( activePage , props . t ) ; return props . children ( title ) ; }
TODO: it really wants to be named useTitle but we're not quite there yet.
TODO : it really wants to be named useTitle but we re not quite there yet .
Get the title of a page