import * as React from 'react'; import Head from 'next/head'; import { LOGO_URL, HOST_URL } from '_constants'; import { withRouter, WithRouterProps } from 'next/router'; interface PageMetaProps extends WithRouterProps { title?: string; component?: string; description?: string; } export function PageMeta({ title, component, router, description }: PageMetaProps) { if (component) { title = `${component} - @material-ui/pickers component`; description = `${component} usage examples and API of @material-ui/pickers`; } if (!description) { description = title; } return ( {title} {router && } ); } export default withRouter(PageMeta);