<commit_before>// @flow
import React from 'react'
import { ga } from 'utils'
import { Link } from 'react-router-dom'

const PostTitle = ({ isTeaser, flow, id, title, isDraft, isMy }: Props) => (
  <div>
    <h1>
      {isTeaser ?
        <span>
          <Link className="flow" to={`/flow/${flow.id}/`} onClick={ga('flow', 'feed page', flow.name)}>{flow.name}</Link>
          <span className="arrow"> → </span>
          <Link className="link" to={`/post/${id}/`}>{title}</Link>
        </span>
      :
        {title}
      }
      {isDraft && <sup>&nbsp;*&nbsp;черновик</sup>}
      {isMy && <sup>&nbsp;<Link className="link" to={`/post/edit/${id}/`}>edit</Link></sup>}
    </h1>
  </div>
)

// PostTitle.propTypes = {
//   isTeaser: PropTypes.bool,
//   flow: PropTypes.shape({
//     id: PropTypes.string,
//     name: PropTypes.string,
//   }),
//   id: PropTypes.number,
//   title: PropTypes.string,
//   isDraft: PropTypes.bool,
//   isMy: PropTypes.bool,
// }

type Props = {
  isTeaser: boolean,
  id: number,
  flow: {
    id: string,
    name: string,
  },
  title: string,
  isDraft?: boolean,
  isMy: boolean,
}

export default PostTitle<commit_msg>Натянуть Material-UI<commit_after>// @flow
import React from 'react'
import { ga } from 'utils'
import { Link } from 'react-router-dom'

const PostTitle = ({ isTeaser, flow, id, title, isDraft, isMy }: Props) => (
  <div>
    <h2>
      {isTeaser ?
        <span>
          <Link className="flow" to={`/flow/${flow.id}/`} onClick={ga('flow', 'feed page', flow.name)}>{flow.name}</Link>
          <span className="arrow"> → </span>
          <Link className="link" to={`/post/${id}/`}>{title}</Link>
        </span>
      :
        title
      }
      {isDraft && <sup>&nbsp;*&nbsp;черновик</sup>}
      {isMy && <sup>&nbsp;<Link className="link" to={`/post/edit/${id}/`}>edit</Link></sup>}
    </h2>
    <style jsx>{`
      h2 {
        font-weight: normal;
        font-size: 1.5em;
        line-height: 1.334;
      }
    `}</style>
  </div>
)

// PostTitle.propTypes = {
//   isTeaser: PropTypes.bool,
//   flow: PropTypes.shape({
//     id: PropTypes.string,
//     name: PropTypes.string,
//   }),
//   id: PropTypes.number,
//   title: PropTypes.string,
//   isDraft: PropTypes.bool,
//   isMy: PropTypes.bool,
// }

type Props = {
  isTeaser?: boolean,
  id: number,
  flow: {
    id: string,
    name: string,
  },
  title: string,
  isDraft?: boolean,
  isMy?: boolean,
}

export default PostTitle
{'fraction_non_alphanumeric': 0.20364372469635628, 'fraction_numerical': 0.004453441295546558, 'mean_word_length': 2.4753867791842477, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4989788', 'n_tokens_mistral': 906, 'n_tokens_neox': 923, 'n_words': 186}