import React from 'react';

import BaseLogin from './template/baseLogin';
import NewYear from './template/newYear';
import InfoLogin from './template/infoLogin';
import Yulin from './template/yulin';
import { initGlobalConfig } from '../../../initConfig';
const LoginTemplate = {
  '新春 - 智联.html': NewYear,
  'Dark - IOTMultiLogin.html': BaseLogin,
  'Dark.html': BaseLogin,
  'DarkCloud.html': BaseLogin,
  '信息化.html': InfoLogin,
  '项目 - 榆林.html': Yulin,
  'default': BaseLogin
};
/* eslint-disable */
export default (props) => {
  React.useEffect(() => {
    initGlobalConfig();
  }, [props.location]);
  const template = window.globalConfig && window.globalConfig.loginTemplate;
  const RenderComponent = LoginTemplate[template] ? LoginTemplate[template]: LoginTemplate['default'];
  return <RenderComponent {...props}/>
};

