import React from 'react';

import { Helmet } from 'react-helmet';
import { renderRoutes } from 'react-router-config';
import {
  BrowserRouter as Router,
  Switch,
} from 'react-router-dom';

import config from '../../routes/config';

export default function App() {
  return (
    <>
      <Helmet
        titleTemplate="%s - 运维平台"
        defaultTitle="运维平台"
      >
        <meta name="description" content="运维平台" />
      </Helmet>
      <Router>
        <Switch>{renderRoutes(config.routes)}</Switch>
      </Router>
    </>
  );
}
