From abec6d734cde8a2bb0924989b1c5801e924137c3 Mon Sep 17 00:00:00 2001
From: Max Nanis
Date: Tue, 10 Jun 2025 03:40:01 +0700
Subject: Adding userProfile redux slice, showing created timestamp on user
 page.

---
 src/Widget.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'src/Widget.tsx')

diff --git a/src/Widget.tsx b/src/Widget.tsx
index e1522c0..16dba81 100644
--- a/src/Widget.tsx
+++ b/src/Widget.tsx
@@ -11,6 +11,7 @@ import {
     CashoutMethodOut,
     MarketProfileKnowledge,
     OfferwallApi,
+    ProductUserApi,
     ProfilingQuestionsApi,
     QuestionInfo,
     UserProfileKnowledge,
@@ -26,6 +27,7 @@ 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 {setUserProfile} from "@/models/userProfileSlice.ts";
 
 import './index.css';
 
@@ -50,6 +52,12 @@ const Widget = () => {
             })
             .catch(err => console.log(err));
 
+        new ProductUserApi().userProfileProductIdUserProductUserIdProfileGet(app.bpid, app.bpuid)
+            .then(res => {
+                dispatch(setUserProfile(res.data["user-profile"]))
+            })
+            .catch(err => console.log(err))
+
         new ProfilingQuestionsApi().getProfilingQuestionsProductIdProfilingQuestionsGet(app.bpid, app.bpuid, "104.9.125.144", undefined, undefined, 2500)
             .then(res => {
                 dispatch(setQuestions(res.data.questions as ProfileQuestion[]))
-- 
cgit v1.2.3

