<commit_before>import React, { SFC } from "react"
import { Media } from "Utils/Responsive"
import { ArtistSearchPreviewQueryRenderer as ArtistSearchPreview } from "./Grids/ArtistSearch"
import { MerchandisableArtworksPreviewQueryRenderer as MerchandisableArtworksPreview } from "./Grids/MerchandisableArtworks"

export interface SearchPreviewProps {
  entityID: string
  entityType: string
}

const map = {
  Artist: ArtistSearchPreview,
  default: MerchandisableArtworksPreview
}

export const SearchPreview: SFC<SearchPreviewProps> = ({
  entityID,
  entityType,
}) => {
  const Preview = map[entityType] || map.default

  return (
    <Media greaterThan="xs">
      <Preview entityID={entityID} />
    </Media>
  )
}<commit_msg>Improve name of component map<commit_after>import React, { SFC } from "react"
import { Media } from "Utils/Responsive"
import { ArtistSearchPreviewQueryRenderer as ArtistSearchPreview } from "./Grids/ArtistSearch"
import { MerchandisableArtworksPreviewQueryRenderer as MerchandisableArtworksPreview } from "./Grids/MerchandisableArtworks"

export interface SearchPreviewProps {
  entityID: string
  entityType: string
}

const previewComponents = {
  Artist: ArtistSearchPreview,
  default: MerchandisableArtworksPreview
}

export const SearchPreview: SFC<SearchPreviewProps> = ({
  entityID,
  entityType,
}) => {
  const Preview = previewComponents[entityType] || previewComponents.default

  return (
    <Media greaterThan="xs">
      <Preview entityID={entityID} />
    </Media>
  )
}
{'fraction_non_alphanumeric': 0.09605263157894736, 'fraction_numerical': 0.0, 'mean_word_length': 5.2592592592592595, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5988411', 'n_tokens_mistral': 450, 'n_tokens_neox': 447, 'n_words': 104}