[Cashtab] [service worker fix p3] Add modal to load latest version on app update
Summary:
T2684
Depends on D12021
Add a modal to notify the user that a more recent version of Cashtab is available with a confirmation option that will reload the page and get the latest version.
This implementation is modeled from this summary: https://felixgerschau.com/create-a-pwa-update-notification-with-create-react-app/
Test Plan:
npm run build
Deploy the site somehow (I used netlify). Visit the site and verify that there is a service worker by opening the dev console and clicking on Application --> Service Workers
Make a visible change. One of the easiest is to change teh WalletLabel.js component to add a new string after the {name} variable inside <WalletName></WalletName>
npm run build
Deploy the site to the same URL
Give it about a minute. You should see the modal introduced in this diff.
Click 'OK' and the page will reload.
You should be able to see your change on the reloaded page.
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D12028