perf: rewrite plebchan completely

This commit is contained in:
plebeius.eth
2024-02-27 17:58:08 +01:00
parent 8f1831b69f
commit c4a5cfec49
95 changed files with 2658 additions and 39527 deletions
+28
View File
@@ -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();
}
});