Skip to content

Commit

Permalink
Fixed Routine view for non expired routines
Browse files Browse the repository at this point in the history
  • Loading branch information
codeAbinash committed Jun 26, 2023
1 parent 4967a83 commit a0ded50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const cacheData = {
showCacheThenFetch: {
name: 'routine-show-cache-then-fetch-v25',
name: 'routine-show-cache-then-fetch-v26',
valid: 'routine-show-cache-then-fetch',
},
emojiCache: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Routines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Routines() {
// }

function AllRoutines({ screenRoutines, allRoutines, expiredRoutines }: { screenRoutines: Routine[] | null, allRoutines: Routine[] | null, expiredRoutines : Routine[]}) {
console.log(screenRoutines)
// console.log(screenRoutines)
const navigate = useNavigate()
const [currentRoutineViewIndex, setCurrentRoutineViewIndex] = useState(0)
const [showRoutineModal, setRoutineModal] = useState(false)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/viewRoutine/RoutineView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function RoutineView({ show, routines, cb, index, expired = false
return () => { document.body.style.overflowY = 'auto' }
}, [isShow])

if (!routines[index] || !expiredRoutines?.[index])
if (!routines[index] || !expiredRoutines)
return null

return <>
Expand Down

0 comments on commit a0ded50

Please sign in to comment.