From 897e93b3a6596d25c19fe0a3579d9cd4c9ea66e7 Mon Sep 17 00:00:00 2001
From: Max Nanis
Date: Mon, 9 Jun 2025 19:12:44 +0700
Subject: Debugging reducer logic for Upk and Marketplace Answers, along with
 Upk global definitions

---
 src/Widget.tsx | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'src/Widget.tsx')

diff --git a/src/Widget.tsx b/src/Widget.tsx
index f355194..dc24bea 100644
--- a/src/Widget.tsx
+++ b/src/Widget.tsx
@@ -6,12 +6,13 @@ import {Offerwall} from "@/pages/Offerwall.tsx"
 import {QuestionsPage} from "@/pages/Questions.tsx";
 
 import {useAppDispatch, useAppSelector} from "@/hooks.ts";
-import {CashoutMethodOut, OfferwallApi, ProfilingQuestionsApi, UserWalletBalance, WalletApi} from "@/api";
+import {CashoutMethodOut, OfferwallApi, ProfilingQuestionsApi, QuestionInfo, UserWalletBalance, WalletApi} from "@/api";
 import {ProfileQuestion, setQuestions} from "@/models/questionSlice.ts";
 import {setBuckets} from "@/models/bucketSlice.ts";
 import {setCashoutMethods} from "@/models/cashoutMethodSlice.ts";
 import {setWallet} from "@/models/walletSlice.ts"
 import {CashoutMethodsPage} from "@/pages/CashoutMethods.tsx";
+import {setUpkQuestions} from "@/models/upkQuestionSlice.ts"
 import {setAvailabilityCount, setOfferwallId} from "@/models/appSlice.ts"
 
 import './index.css';
@@ -43,6 +44,18 @@ const Widget = () => {
             })
             .catch(err => console.log(err));
 
+        new ProfilingQuestionsApi().userProfileProductIdUserProfileGet(app.bpid, app.bpuid, "us")
+            .then(res => {
+                console.log("Marketplace Profile", res.data["user-profile"].marketplace_profile_knowledge)
+                console.log("UPK Profile", res.data["user-profile"].user_profile_knowledge)
+            }).catch(err => console.log(err))
+
+        new ProfilingQuestionsApi().profilingInfoProductIdProfilingInfoGet(app.bpid, "us")
+            .then(res => {
+                dispatch(setUpkQuestions(res.data["profiling-info"] as QuestionInfo[]))
+            })
+            .catch(err => console.log(err))
+
         new WalletApi().getCashoutMethodsProductIdCashoutMethodsGet(app.bpid, app.bpuid)
             .then(res => {
                 dispatch(setCashoutMethods(res.data.cashout_methods as CashoutMethodOut[]))
-- 
cgit v1.2.3

