// @flow import React from 'react'; import Head from 'src/components/head'; import getThreadLink from 'src/helpers/get-thread-link'; import generateMetaInfo from 'shared/generate-meta-info'; import type { ThreadInfoType } from 'shared/graphql/fragments/thread/threadInfo'; type Props = { thread: ThreadInfoType, }; const ThreadHead = (props: Props) => { const { thread } = props; const { metaImage, type, community, content, createdAt, modifiedAt, author, } = thread; const { title, description } = generateMetaInfo({ type: 'thread', data: { title: content.title, body: content.body, type: type, communityName: community.name, }, }); return (
{metaImage && } {community.redirect && community.noindex && ( )} ); }; export default ThreadHead;