<commit_before>import firebase from 'firebase';
import { FETCH_PROJECTS } from './types';


const database = app.database();
const projects = database.ref('projects');

// const INITIAL_PROJECTS = [{ id: 1, name: 'Tower' }, 
//                           { id: 2, name: 'Apartment' },
//                           { id: 3, name: 'Office' }];

// export function fetchProjects() {
//   return {
//     type: FETCH_PROJECTS,
//     payload: INITIAL_PROJECTS
//   };
// }

export function fetchProjects() {
  return dispatch => {
    projects.on('value', snapshot => {
      dispatch({
        type: FETCH_PROJECTS,
        payload: snapshot.val()
      })<commit_msg>remove mock data<commit_after>import firebase from 'firebase';
import { FETCH_PROJECTS } from './types';

const projects = firebaseDb.ref('projects');

export function fetchProjects() {
  return dispatch => {
    projects.on('value', snapshot => {
      dispatch({
        type: FETCH_PROJECTS,
        payload: snapshot.val()
      })
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.003003003003003003, 'mean_word_length': 2.5714285714285716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5685897', 'n_tokens_mistral': 313, 'n_tokens_neox': 306, 'n_words': 73}