Skip to content

Commit

Permalink
Merge pull request #57 from emiliosheinz/develop
Browse files Browse the repository at this point in the history
fix: 🐛 fixes cards returned in review session
  • Loading branch information
emiliosheinz authored May 1, 2023
2 parents 6eca5f9 + 35e7f63 commit b3fa4b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server/api/routers/study-session/study-session.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ export const studySessionRouter = createTRPCRouter({
cards: studySessionBoxCards
.filter(boxCard => {
const lastAttempt = boxCard.studySessionAttempts[0]?.createdAt
return !lastAttempt || !lastReview || lastAttempt < lastReview

if (!lastAttempt) return true
if (!lastReview) return false

return lastAttempt < lastReview
})
.map(boxCard => ({
id: boxCard.card.id,
Expand Down

1 comment on commit b3fa4b6

@vercel
Copy link

@vercel vercel bot commented on b3fa4b6 May 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

briskly – ./

briskly-git-main-emiliosheinz.vercel.app
briskly-emiliosheinz.vercel.app
briskly.app

Please sign in to comment.