import React from 'react';
import ReactDOM from 'react-dom';
import FastClick from 'fastclick';

import AppContainer from './entrance/setup';

export var bizConfig = {};
export var exclusivePath = {};

export default function initComponent(homePage, biz_config, exclusive_path) {

  bizConfig = biz_config;
  exclusivePath = exclusive_path;

  ReactDOM.render(
    <AppContainer homePage={homePage} />, // eslint-disable-line
    document.getElementById('root')
  );
  // Eliminates the 300ms delay between a physical tap
  // and the firing of a click event on mobile browsers
  // https://github.com/ftlabs/fastclick
  FastClick.attach(document.body);

  if (module.hot) {
    module.hot.accept();
  }
}

import './utils/smoothscroll'; // eslint-disable-line import/imports-first

