aboutsummaryrefslogtreecommitdiff
path: root/src/Widget.tsx
diff options
context:
space:
mode:
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[]))