2023-01-29 21:07:23 +01:00
|
|
|
import React from 'react';
|
2023-01-31 23:08:57 +01:00
|
|
|
import ReactDOM from 'react-dom/client';
|
2023-01-29 21:07:23 +01:00
|
|
|
import App from './App';
|
2023-02-01 13:30:32 +01:00
|
|
|
import { HelmetProvider } from 'react-helmet-async';
|
2023-02-10 12:57:17 +01:00
|
|
|
import { HashRouter } from 'react-router-dom';
|
2023-04-24 21:20:42 +00:00
|
|
|
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
|
2023-01-29 21:07:23 +01:00
|
|
|
|
2023-04-24 19:42:49 +00:00
|
|
|
import PlebbitJs from '@plebbit/plebbit-js';
|
|
|
|
|
// inject native functions into renderer
|
|
|
|
|
// https://github.com/plebbit/plebbit-js/blob/master/docs/cross-platform-native-functions.md
|
|
|
|
|
if (window.plebbitJsNativeFunctions) {
|
|
|
|
|
PlebbitJs.setNativeFunctions(window.plebbitJsNativeFunctions);
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-31 23:08:57 +01:00
|
|
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
|
|
|
root.render(
|
|
|
|
|
<React.StrictMode>
|
2023-02-01 13:30:32 +01:00
|
|
|
<HelmetProvider>
|
2023-02-10 12:57:17 +01:00
|
|
|
<HashRouter>
|
2023-02-01 13:30:32 +01:00
|
|
|
<App />
|
2023-02-10 12:57:17 +01:00
|
|
|
</HashRouter>
|
2023-02-01 13:30:32 +01:00
|
|
|
</HelmetProvider>
|
2023-01-31 23:08:57 +01:00
|
|
|
</React.StrictMode>
|
2023-04-24 21:20:42 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// set up PWA https://cra.link/PWA
|
|
|
|
|
serviceWorkerRegistration.register();
|