File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ import {
10
10
} from "react-router-dom" ;
11
11
import { QueryClient , QueryClientProvider } from '@tanstack/react-query' ;
12
12
import { DataContextProvider } from "./contexts/DataContext" ;
13
+ import pwaUrl from "./lib/pwaUrl" ;
13
14
14
15
const queryClient = new QueryClient ( ) ;
15
16
16
17
if ( 'serviceWorker' in navigator ) {
17
18
window . addEventListener ( 'load' , ( ) => {
18
- navigator . serviceWorker . register ( '/ service-worker.js') . then ( registration => {
19
+ navigator . serviceWorker . register ( pwaUrl + ' service-worker.js') . then ( registration => {
19
20
console . log ( 'ServiceWorker registration successful with scope: ' , registration . scope ) ;
20
21
} ) . catch ( error => {
21
22
console . log ( 'ServiceWorker registration failed: ' , error ) ;
You can’t perform that action at this time.
0 commit comments