From 51b1003d1e0ce43aa6c30f461d710cb09cdfc29f Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Sat, 7 Jun 2025 04:17:19 +0700 Subject: Passing in onClick for FullProfileQuestion so that Profile Question and SoftPair are different. Using API models to POST to Softpair submission (with offerwall_id saved). Updating from Conditional to Ineligible buckets. Availability Count to app state. Using / exploring sidebar to show filtered questions for specific Bucket. --- src/models/questionSlice.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/models/questionSlice.ts') diff --git a/src/models/questionSlice.ts b/src/models/questionSlice.ts index 9543088..a617234 100644 --- a/src/models/questionSlice.ts +++ b/src/models/questionSlice.ts @@ -58,6 +58,12 @@ export default questionSlice.reducer // We need to fetch the next available Question that either doesn't have an Answer, or the Answer // isn't Answer.completed export const selectQuestions = (state: RootState) => state.questions +export const makeSelectQuestionsByIds = (ids: string[]) => + createSelector( + (state: RootState) => state.questions, + (questions: ProfileQuestion[]) => questions.filter(q => ids.includes(q.question_id)) + ) + export const selectActiveQuestion = (state: RootState) => state.questions.find(i => i.active) export const selectAnswers = (state: RootState) => state.answers -- cgit v1.2.3