forked from chaimeleon-eu/dataset-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
40 lines (35 loc) · 1.43 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
// Careful with the order of CSS loading, if you want to modify Bootstrap's settings
import 'bootstrap/dist/css/bootstrap.min.css';
import './index.css';
import AppKeycloak from './AppKeycloak';
import reportWebVitals from './reportWebVitals';
import config from "./service/config";
import {store} from "./store";
//const Loading = () => <div>Loading, please wait...</div>
function favicon(rel: string, iconPath: string): void {
var link: HTMLLinkElement = document.querySelector(`link[rel*='${rel}']`) || document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'icon';
link.href = process.env["PUBLIC_URL"] + iconPath;
document?.getElementsByTagName('head')[0]?.appendChild(link);
}
if (config.project?.favicon) {
favicon("icon", config.project.favicon);
favicon("apple-touch-icon", config.project.favicon);
}
const domNode: HTMLElement | null = document.getElementById('root');
if (domNode) {
const root = createRoot(domNode);
root.render(
<Provider store={store}>
<AppKeycloak />
</Provider>
);
}
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();