aboutsummaryrefslogtreecommitdiff
path: root/src/Widget.tsx
diff options
context:
space:
mode:
authorMax Nanis2025-06-10 02:51:37 +0700
committerMax Nanis2025-06-10 02:51:37 +0700
commite5dac8b9d61b175b09d859643a94ea91ee6ef48d (patch)
treed98ffbca9421e5218411d43d7bf5e5beea411a36 /src/Widget.tsx
parent897e93b3a6596d25c19fe0a3579d9cd4c9ea66e7 (diff)
downloadpanel-ui-e5dac8b9d61b175b09d859643a94ea91ee6ef48d.tar.gz
panel-ui-e5dac8b9d61b175b09d859643a94ea91ee6ef48d.zip
Demographics page. userMarketplaceAnswer & userUpkAnswer redux stores.
Diffstat (limited to 'src/Widget.tsx')
-rw-r--r--src/Widget.tsx19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Widget.tsx b/src/Widget.tsx
index dc24bea..e1522c0 100644
--- a/src/Widget.tsx
+++ b/src/Widget.tsx
@@ -4,9 +4,19 @@ import {SiteHeader} from "@/components/site-header"
import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar"
import {Offerwall} from "@/pages/Offerwall.tsx"
import {QuestionsPage} from "@/pages/Questions.tsx";
+import {Demographics} from "@/pages/Demographics.tsx"
import {useAppDispatch, useAppSelector} from "@/hooks.ts";
-import {CashoutMethodOut, OfferwallApi, ProfilingQuestionsApi, QuestionInfo, UserWalletBalance, WalletApi} from "@/api";
+import {
+ CashoutMethodOut,
+ MarketProfileKnowledge,
+ OfferwallApi,
+ ProfilingQuestionsApi,
+ QuestionInfo,
+ UserProfileKnowledge,
+ UserWalletBalance,
+ WalletApi
+} from "@/api";
import {ProfileQuestion, setQuestions} from "@/models/questionSlice.ts";
import {setBuckets} from "@/models/bucketSlice.ts";
import {setCashoutMethods} from "@/models/cashoutMethodSlice.ts";
@@ -14,6 +24,8 @@ 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 {setUpkAnswers} from "@/models/userUpkAnswerSlice.ts";
+import {setMarketplaceAnswers} from "@/models/userMarketplaceAnswerSlice.ts";
import './index.css';
@@ -46,8 +58,8 @@ const Widget = () => {
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)
+ dispatch(setMarketplaceAnswers(res.data["user-profile"].marketplace_profile_knowledge as MarketProfileKnowledge[]))
+ dispatch(setUpkAnswers(res.data["user-profile"].user_profile_knowledge as UserProfileKnowledge[]))
}).catch(err => console.log(err))
new ProfilingQuestionsApi().profilingInfoProductIdProfilingInfoGet(app.bpid, "us")
@@ -86,6 +98,7 @@ const Widget = () => {
{app.currentPage === 'offerwall' && <Offerwall/>}
{app.currentPage === 'questions' && <QuestionsPage/>}
{app.currentPage === 'cashout_methods' && <CashoutMethodsPage/>}
+ {app.currentPage === 'demographics' && <Demographics/>}
</div>
</div>
</div>