<commit_before>import React from 'react'
import api from '../data/api'

var {
  SimpleDataTable, SimpleDataTableColumn,
  Paginator, SearchBar
} = require('react-datascope')
import AdminPage from './AdminPage'

const fields = {
  edit_link: {
    title: 'Edit',
    key: 'id',
    renderer: (id) => {
      return <a href={`/datapoints/campaigns/update/${id}`}>Edit Campaign</a>
    }
  },
  id: { title: 'ID', name: 'id' },
  slug: { title: 'Display Name', name: 'slug' },
  start_date: { title: 'Start Date', name: 'start_date' },
  end_date: { title: 'End Date', name: 'end_date' },
  created_at: { title: 'Created At', name: 'created_at', format: 'MMM D YYYY, h:mm a' }
}

const schema = {
  created_at: { type: 'string', format: 'date-time' }
}

const fieldNamesOnTable = ['id', 'slug', 'start_date', 'end_date', 'created_at', 'edit_link']

var CampaignsAdmin = React.createClass({
  render () {
    var datascopeFilters = (
      <div>
        <SearchBar
          placeholder='Search campaigns ...'
          fieldNames={['id', 'slug', 'edit_link']}
          />
      </div>
    )
<commit_msg>fix the campaign slug 710<commit_after>import React from 'react'
import api from '../data/api'

var {
  SimpleDataTable, SimpleDataTableColumn,
  Paginator, SearchBar
} = require('react-datascope')
import AdminPage from './AdminPage'

const fields = {
  edit_link: {
    title: 'Edit',
    key: 'id',
    renderer: (id) => {
      return <a href={`/datapoints/campaigns/update/${id}`}>Edit Campaign</a>
    }
  },
  id: { title: 'ID', name: 'id' },
  name: { title: 'Display Name', name: 'name' },
  start_date: { title: 'Start Date', name: 'start_date' },
  end_date: { title: 'End Date', name: 'end_date' },
  created_at: { title: 'Created At', name: 'created_at', format: 'MMM D YYYY, h:mm a' }
}

const schema = {
  created_at: { type: 'string', format: 'date-time' }
}

const fieldNamesOnTable = ['id', 'name', 'start_date', 'end_date', 'created_at', 'edit_link']

var CampaignsAdmin = React.createClass({
  render () {
    var datascopeFilters = (
      <div>
        <SearchBar
          placeholder='Search campaigns ...'
          fieldNames={['id', 'slug', 'edit_link']}
          />
      </div>
    )

{'fraction_non_alphanumeric': 0.17705510388437218, 'fraction_numerical': 0.0013550135501355014, 'mean_word_length': 3.2843326885880075, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '5814785', 'n_tokens_mistral': 780, 'n_tokens_neox': 783, 'n_words': 194}