37 lines
726 B
JavaScript

import { useEffect } from 'react';
import { AppRoutes } from './app/Routes';
import './App.css';
import { isTestMode } from './conf/config';
import ExportJobs from './components/ExportJobs';
const BaseTag = () => {
useEffect(() => {
if (isTestMode) {
const baseTag = document.createElement('base');
baseTag.href = process.env.REACT_APP_BASE_URL || window.location.origin;
document.head.prepend(baseTag);
return () => {
const existingBase = document.querySelector('base');
if (existingBase) {
existingBase.remove();
}
};
}
}, []);
return null;
};
function App() {
return (
<div className='App'>
<BaseTag />
<AppRoutes />
<ExportJobs />
</div>
);
}
export default App;