mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf: rewrite plebchan completely
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './app';
|
||||
import { HashRouter as Router } from 'react-router-dom';
|
||||
import './index.css';
|
||||
import { App as CapacitorApp } from '@capacitor/app';
|
||||
import * as serviceWorkerRegistration from './service-worker-registration';
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<Router>
|
||||
<App />
|
||||
</Router>
|
||||
</React.StrictMode>,
|
||||
);
|
||||
|
||||
// set up PWA https://cra.link/PWA
|
||||
serviceWorkerRegistration.register();
|
||||
|
||||
// add back button in android app
|
||||
CapacitorApp.addListener('backButton', ({ canGoBack }) => {
|
||||
if (canGoBack) {
|
||||
window.history.back();
|
||||
} else {
|
||||
CapacitorApp.exitApp();
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user