mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
added service worker
This commit is contained in:
parent
944be7f4b1
commit
350a090ac3
1 changed files with 8 additions and 0 deletions
|
@ -100,3 +100,11 @@ export const Index = () => (
|
||||||
);
|
);
|
||||||
|
|
||||||
ReactDOM.render(<Index />, document.getElementById('index'));
|
ReactDOM.render(<Index />, document.getElementById('index'));
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.register('./service-worker.js', { scope: '/' })
|
||||||
|
.then(() => console.log('Service Worker registered successfully.'))
|
||||||
|
.catch(error => console.log('Service Worker registration failed:', error));
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue