test: onRegisteredSW

dev/timezone
Lei OT 1 year ago
parent 76a1ed525e
commit 2a9fc4c790

@ -18,10 +18,10 @@ function ReloadPrompt() {
// if (reloadSW === 'true') {
r &&
setTimeout(() => {
console.log('Checking for sw update, ', `__BUILD_DATE__`, `__APP_VERSION__`);
r.update();
setInterval(() => {
// console.log('Checking for sw update');
r.update();
}, 1000 * 60 * 60 * 8);
}, 1000 * 3);
@ -42,6 +42,7 @@ function ReloadPrompt() {
return (
<>
{/* {offlineReady && (<span>{APP_VERSION}</span>) } */}
{needRefresh && (
<a className=' text-sky-600 px-2' onClick={() => updateServiceWorker(true)}>
有新版本~点击更新🚀

Loading…
Cancel
Save