pashto-grammar/src/main.tsx

30 lines
764 B
TypeScript
Raw Normal View History

2024-07-08 18:42:10 +00:00
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
2023-02-04 12:20:48 +00:00
import "bootstrap/dist/css/bootstrap.min.css";
import "@fortawesome/fontawesome-free/css/all.css";
import { registerSW } from "virtual:pwa-register";
2024-07-08 18:42:10 +00:00
import { BrowserRouter } from "react-router-dom";
import { UserProvider } from "./user-context";
2023-02-04 12:20:48 +00:00
const updateSW = registerSW({
onNeedRefresh() {
if (confirm("New content available. Reload?")) {
updateSW(true);
}
},
onOfflineReady() {
console.log("offline ready");
},
});
2024-07-08 18:42:10 +00:00
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
2023-02-04 12:20:48 +00:00
<React.StrictMode>
<BrowserRouter>
<UserProvider>
<App />
</UserProvider>
</BrowserRouter>
2024-07-08 18:42:10 +00:00
</React.StrictMode>
2023-02-04 12:20:48 +00:00
);