This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 7
7
< meta name ="theme-color " content ="#000000 " />
8
8
< meta name ="description " content ="Todo App " />
9
9
< link rel ="apple-touch-icon " href ="%PUBLIC_URL%/logo192.png " />
10
- <!-- <link rel="apple-touch-icon" href="./logo192.png" /> -->
11
10
<!--
12
11
manifest.json provides metadata used when your web app is installed on a
13
12
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14
13
-->
15
14
< link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
16
- <!-- <link rel="manifest" href="./manifest.json" /> -->
17
15
<!--
18
16
Notice the use of %PUBLIC_URL% in the tags above.
19
17
It will be replaced with the URL of the `public` folder during the build.
41
39
< script >
42
40
if ( 'serviceWorker' in navigator ) {
43
41
window . addEventListener ( 'load' , ( ) => {
42
+ console . log ( 'serviceWorker custom' ) ;
44
43
navigator . serviceWorker
45
- . register ( './serviceworker.js' , {
46
- // scope: '.', // <--- THIS BIT IS REQUIRED
47
- } )
44
+ . register ( './my-serviceworker.js' )
48
45
. then ( ( reg ) => console . log ( 'Success: ' , reg . scope ) )
49
46
. catch ( ( err ) => console . log ( 'Failure: ' , err ) ) ;
50
47
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "short_name" : " Todo App " ,
3
- "name" : " Todo App PWA" ,
2
+ "short_name" : " Todo app v2 " ,
3
+ "name" : " Todo app PWA v2 " ,
4
4
"icons" : [
5
5
{
6
6
"src" : " favicon.ico" ,
Original file line number Diff line number Diff line change 1
1
const CACHE_NAME = 'version-1' ;
2
- const urlsToCache = [ 'index.html' , 'offline.html' ] ;
2
+ const urlsToCache = [
3
+ 'index.html' ,
4
+ 'offline.html' ,
5
+ 'https://todo-restapi-app.herokuapp.com/api/todos?all=true' ,
6
+ '/todo' ,
7
+ ] ;
3
8
4
9
const self = this ;
5
10
Original file line number Diff line number Diff line change 37
37
< body >
38
38
< div class ="city ">
39
39
< h2 class ="city-name ">
40
- < span > Please go to online.</ span >
40
+ < span > Please go to online 1 .</ span >
41
41
</ h2 >
42
42
</ div >
43
43
</ body >
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ ReactDOM.render(
21
21
// If you want your app to work offline and load faster, you can change
22
22
// unregister() to register() below. Note this comes with some pitfalls.
23
23
// Learn more about service workers: https://bit.ly/CRA-PWA
24
- serviceWorker . register ( ) ;
24
+ serviceWorker . unregister ( ) ;
You can’t perform that action at this time.
0 commit comments