From 89e34a79df51327a8e0eb75d81dab6d1c1810166 Mon Sep 17 00:00:00 2001 From: Malik Piara Date: Fri, 24 Jan 2025 13:08:38 +0000 Subject: [PATCH] Caching every quiz to work offline. --- app/progress/page.tsx | 4 ++-- public/sw.js | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/progress/page.tsx b/app/progress/page.tsx index 999965a..7c3e394 100644 --- a/app/progress/page.tsx +++ b/app/progress/page.tsx @@ -55,7 +55,7 @@ const logicSections = [ { title: 'Deontic', icon: Book, - progress: 0, + progress: 30, items: [ { label: 'L. Translations', href: '#' }, { label: 'M. Proofs', href: '#' }, @@ -64,7 +64,7 @@ const logicSections = [ { title: 'Belief', icon: Brain, - progress: 0, + progress: 30, items: [ { label: 'N. Translations', href: '#' }, { label: 'O. Proofs', href: '#' }, diff --git a/public/sw.js b/public/sw.js index 9ffdd68..9ec195e 100644 --- a/public/sw.js +++ b/public/sw.js @@ -6,9 +6,24 @@ const urlsToCache = [ // Add other static assets like '/globals.css', // Add any other pages/routes you want to cache - '/syllogistic/translations/quiz', + 'syllogistic/translations/basic/quiz', + 'syllogistic/translations/hard/quiz', + 'syllogistic', + + 'propositional/translations/quiz', + 'propositional/translations/hard/quiz', + 'modal/translations/basic/quiz', + 'modal/translations/quantified/quiz', + + 'Deontic/translations/Imperative/quiz', + 'Deontic/translations/Deontic/quiz', + 'belief/translations/basic/quiz', + 'belief/translations/willing/quiz', + 'belief/translations/rationality/quiz', + 'informal/definitions/quiz', 'propositional/translations/quiz', + 'keyboard' ]; self.addEventListener('install', (event) => {