<commit_before>// @flow

import { Link } from 'react-router-dom'
import React from 'react'
import styled from 'styled-components'

const Wrapper = styled(Link)`
  width: 32%;
  border: 2px solid #333;
  border-radius: 4px;
  margin-bottom: 25px;
  padding-right: 10px;
  overflow: hidden;
  color: black;
  text-decoration: none;
`

const Image = styled.img`
  width: 46%;
  float: left;
  margin-right: 10px;
`

const ShowCard = (props: Show) => (
  <Wrapper to={`/details/${props.imdbID}`}>
    <Image
      src={`/public/img/posters/${props.poster}`}
      alt={`${props.title} show poster`}
    />
    <div>
      <h3>{props.title}</h3>
      <h4>({props.year})</h4>
      <p>{props.description}</p>
    </div>
  </Wrapper>
)

export default ShowCard
<commit_msg>perf: shouldComponentUpdate function enhances ShowCard<commit_after>// @flow

import { Link } from 'react-router-dom'
import React, { Component } from 'react'
import styled from 'styled-components'

const Wrapper = styled(Link)`
  width: 32%;
  border: 2px solid #333;
  border-radius: 4px;
  margin-bottom: 25px;
  padding-right: 10px;
  overflow: hidden;
  color: black;
  text-decoration: none;
`

const Image = styled.img`
  width: 46%;
  float: left;
  margin-right: 10px;
`

class ShowCard extends Component {
  shouldComponentUpdate() {
    return false
  }

  props: Show

  render() {
    return (
      <Wrapper to={`/details/${this.props.imdbID}`}>
        <Image
          src={`/public/img/posters/${this.props.poster}`}
          alt={`${this.props.title} show poster`}
        />
        <div>
          <h3>{this.props.title}</h3>
          <h4>({this.props.year})</h4>
          <p>{this.props.description}</p>
        </div>
      </Wrapper>
    )
  }
}

export default ShowCard

{'fraction_non_alphanumeric': 0.1626984126984127, 'fraction_numerical': 0.021541950113378686, 'mean_word_length': 2.879120879120879, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 26, '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': '6910405', 'n_tokens_mistral': 653, 'n_tokens_neox': 627, 'n_words': 140}