{"size": 1095, "ext": "js", "max_stars_repo_path": "client/coral-admin/src/index.js", "max_stars_repo_name": "MinnPost/coralproject-talk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/coral-admin/src/index.js", "max_issues_repo_name": "MinnPost/coralproject-talk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/coral-admin/src/index.js", "max_forks_repo_name": "MinnPost/coralproject-talk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.4166666667, "max_line_length": 103, "alphanum_fraction": 0.7397260274}
import React from 'react';
import {render} from 'react-dom';
import smoothscroll from 'smoothscroll-polyfill';
import TalkProvider from 'coral-framework/components/TalkProvider';
import {createContext} from 'coral-framework/services/bootstrap';
import reducers from './reducers';
import App from './components/App';
import 'react-mdl/extra/material.js';
import graphqlExtension from './graphql';
import pluginsConfig from 'pluginsConfig';
import {toast} from 'react-toastify';
import {createNotificationService} from './services/notification';
import {hideShortcutsNote} from './actions/moderation';

smoothscroll.polyfill();

function init({store, storage}) {
  if (storage && storage.getItem('coral:shortcutsNote') === 'hide') {
    store.dispatch(hideShortcutsNote());
  }
}

async function main() {
  const notification = createNotificationService(toast);
  const context = await createContext({reducers, graphqlExtension, pluginsConfig, notification, init});

  render(
    <TalkProvider {...context}>
      <App />
    </TalkProvider>
    , document.querySelector('#root')
  );
}

main();
