<commit_before>import {shell} from 'electron'
import * as React from 'react'

import User from './user'
import {Repo} from './lib/api'

import {Octicon, OcticonSymbol} from './ui/octicons'

interface InfoProps {
  selectedRepo: Repo,
  user: User
}

interface InfoState {

}

const ContainerStyle = {
  display: 'flex',
  flexDirection: 'column',
  flex: 1
}

export default class Info extends React.Component<InfoProps, InfoState> {
  private renderNoSelection() {
    return (
      <div>
        <div>No repo selected!</div>
      </div>
    )
  }

  private iconForRepo(repo: Repo): OcticonSymbol {

    if (repo.private) { return OcticonSymbol.lock }
    if (repo.fork) { return OcticonSymbol.repoForked }

    return OcticonSymbol.repo
  }

  public render() {
    const repo = this.props.selectedRepo
    if (!repo) {
      return this.renderNoSelection()
    }

    const symbol = this.iconForRepo(repo)

    return (
      <div style={ContainerStyle}>
        <h1><Octicon height={32} width={32} symbol={symbol} /> {repo.name}</h1>
        Stars: {repo.stargazersCount}<commit_msg>Remove octicons from info view, we only used it as a testbed anyway<commit_after>import {shell} from 'electron'
import * as React from 'react'

import User from './user'
import {Repo} from './lib/api'

interface InfoProps {
  selectedRepo: Repo,
  user: User
}

interface InfoState {

}

const ContainerStyle = {
  display: 'flex',
  flexDirection: 'column',
  flex: 1
}

export default class Info extends React.Component<InfoProps, InfoState> {
  private renderNoSelection() {
    return (
      <div>
        <div>No repo selected!</div>
      </div>
    )
  }



  public render() {
    const repo = this.props.selectedRepo
    if (!repo) {
      return this.renderNoSelection()
    }


    return (
      <div style={ContainerStyle}>
        <h1>{repo.name}</h1>
        Stars: {repo.stargazersCount}
{'fraction_non_alphanumeric': 0.12249208025343189, 'fraction_numerical': 0.005279831045406547, 'mean_word_length': 3.075268817204301, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '7005006', 'n_tokens_mistral': 616, 'n_tokens_neox': 607, 'n_words': 163}