{"size": 741, "ext": "js", "max_stars_repo_path": "src/views/Home/components/scrollingListItem.js", "max_stars_repo_name": "emanueledancelli/balotta-client", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/views/Home/components/scrollingListItem.js", "max_issues_repo_name": "emanueledancelli/balotta-client", "max_issues_repo_issues_event_min_datetime": "2021-09-02T21:13:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T14:47:06.000Z", "max_forks_repo_path": "src/views/Home/components/scrollingListItem.js", "max_forks_repo_name": "emanueledancelli/balo-fe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 22.4545454545, "max_line_length": 76, "alphanum_fraction": 0.5883940621}
import React from "react";
import { Link } from "react-router-dom";
import { HorizontalContainer, Image, CardTitle, Tag } from "../style";

const scrollingListItem = ({
  title,
  hasTags,
  tags,
  listName,
  index,
  id,
  thumbnail,
  medium
}) => {
  const iw = window.innerWidth;
  return (
    <Link
      style={{ display: "inline-block" }}
      to={iw > 940 ? `/single/${id}` : `/eventi/${listName}/${id}/${index}`}
      key={id}
    >
      <HorizontalContainer>
        <Image thumb={thumbnail} medium={medium}>
          {hasTags && <Tag>{tags || null}</Tag>}
        </Image>
        <CardTitle dangerouslySetInnerHTML={{ __html: title }} />
      </HorizontalContainer>
    </Link>
  );
};

export default scrollingListItem;
