<commit_before>import React from "react"
import { SectionList } from "react-native"
import { StyleSheet } from "react-native"
import { createFragmentContainer, graphql } from "react-relay"
import LotsByFollowedArtists from "./Components/LotsByFollowedArtists"
import { SaleList } from "./Components/SaleList"

class Sales extends React.Component<Props> {
  get data() {
    const { viewer } = this.props
    const liveAuctions = viewer.sales.filter(a => !!a.live_start_at)
    const timedAuctions = viewer.sales.filter(a => !a.live_start_at)

    return {
      liveAuctions,
      timedAuctions,
      viewer,
    }
  }

  render() {
    const sections = [
      {
        data: [{ data: this.data.liveAuctions }],
        title: "Current Live Auctions",
        renderItem: props => <SaleList {...props} />,
      },
      {
        data: [{ data: this.data.timedAuctions }],
        title: "Current Timed Auctions",
        renderItem: props => <SaleList {...props} />,
      },
      {
        data: [{ data: this.data.viewer }],
        title: "Lots by Artists You Follow",
        renderItem: props => <LotsByFollowedArtists title={props.section.title} viewer={props.item.data} />,<commit_msg>[Auctions] adds web view for auction tab zero state<commit_after>import React from "react"
import { SectionList, StyleSheet, WebView } from "react-native"
import { createFragmentContainer, graphql } from "react-relay"
import LotsByFollowedArtists from "./Components/LotsByFollowedArtists"
import { SaleList } from "./Components/SaleList"

class Sales extends React.Component<Props> {
  get data() {
    const { viewer } = this.props
    const liveAuctions = viewer.sales.filter(a => !!a.live_start_at)
    const timedAuctions = viewer.sales.filter(a => !a.live_start_at)

    return {
      liveAuctions,
      timedAuctions,
      viewer,
    }
  }

  hasData() {
    const { liveAuctions, timedAuctions, viewer } = this.data
    return liveAuctions.length > 0 || timedAuctions.length > 0 || viewer.sales.length > 0
  }

  render() {
    const hasData = this.hasData()
    if (!hasData) {
      return <WebView source={{ uri: "https://www.artsy.net/auctions" }} style={{ flex: 1 }} />
    }

    const sections = [
      {
        data: [{ data: this.data.liveAuctions }],
        title: "Current Live Auctions",
        renderItem: props => <SaleList {...props} />,
      },
      {
        data: [{ data: this.data.timedAuctions }],
        title: "Current Timed Auctions",
        renderItem: props => <SaleList {...props} />,
      },
      {
        data: [{ data: this.data.viewer }],
        title: "Lots by Artists You Follow",
        renderItem: props => <LotsByFollowedArtists title={props.section.title} viewer={props.item.data} />,
{'fraction_non_alphanumeric': 0.13629737609329445, 'fraction_numerical': 0.0014577259475218659, 'mean_word_length': 2.833798882681564, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 25, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '4432916', 'n_tokens_mistral': 896, 'n_tokens_neox': 846, 'n_words': 202}