All files / src client.js

80% Statements 4/5
50% Branches 1/2
100% Functions 1/1
80% Lines 4/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22                    1x 1x   1x   1x            
/*
 * This file setups up the SPArtacus client (app)
 */
 
/* eslint-disable react/jsx-filename-extension  */
import React from 'react';
import 'babel-polyfill';
import { hydrate } from 'react-dom';
import { ClientApp } from './app';
 
const setupClient = ({ data, routes, module }) => {
  const root = document.getElementById('root');
 
  hydrate(<ClientApp data={data} routes={routes} />, root);
 
  Iif (module.hot) {
    module.hot.accept();
  }
};
 
export default setupClient;