aboutsummaryrefslogtreecommitdiff
path: root/src/Widget.tsx
diff options
context:
space:
mode:
authorMax Nanis2025-06-09 19:12:44 +0700
committerMax Nanis2025-06-09 19:12:44 +0700
commit897e93b3a6596d25c19fe0a3579d9cd4c9ea66e7 (patch)
treee9adf209e4cf9061b3ac383c8d13c2ded0203daf /src/Widget.tsx
parent74890e251dee3e0f195583431cb48b9f3a58ecc9 (diff)
downloadpanel-ui-897e93b3a6596d25c19fe0a3579d9cd4c9ea66e7.tar.gz
panel-ui-897e93b3a6596d25c19fe0a3579d9cd4c9ea66e7.zip
Debugging reducer logic for Upk and Marketplace Answers, along with Upk global definitions
Diffstat (limited to 'src/Widget.tsx')
-rw-r--r--src/Widget.tsx15
1 files changed, 14 insertions, 1 deletions
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[]))