aboutsummaryrefslogtreecommitdiff
path: root/jb-ui/src/JBApp.tsx
diff options
context:
space:
mode:
authorMax Nanis2026-09-11 23:06:59 -0700
committerMax Nanis2026-09-11 23:06:59 -0700
commitf82ac61b6a044467ab37c0645c3fe99b40bedfc5 (patch)
treee55d6879f4cfaf683e4bee1b6f0221ddc3baf799 /jb-ui/src/JBApp.tsx
parent11d63b171501b9c29398133b795c3bcc1ae85a1b (diff)
downloadamt-jb-f82ac61b6a044467ab37c0645c3fe99b40bedfc5.tar.gz
amt-jb-f82ac61b6a044467ab37c0645c3fe99b40bedfc5.zip
replace references to bpuid with logged in user
Diffstat (limited to 'jb-ui/src/JBApp.tsx')
-rw-r--r--jb-ui/src/JBApp.tsx14
1 files changed, 5 insertions, 9 deletions
diff --git a/jb-ui/src/JBApp.tsx b/jb-ui/src/JBApp.tsx
index fd0eeba..a69cc85 100644
--- a/jb-ui/src/JBApp.tsx
+++ b/jb-ui/src/JBApp.tsx
@@ -16,6 +16,7 @@ import {
import Footer from "@/components/Footer";
import { useAppDispatch } from "@/hooks";
import { bpid, routeBasename, tagManager } from "@/lib/utils";
+import { useGetMeQuery } from "@/models/authAPI";
import {
setAssignmentID,
setProductUserID,
@@ -72,24 +73,19 @@ function isPingMessage(msg: Message): msg is PingMessage {
function QueryParamProcessor() {
const dispatch = useAppDispatch();
const [searchParams] = useSearchParams();
+ const { data: user, isLoading, isError } = useGetMeQuery();
useEffect(() => {
- const worker_id = searchParams.get("workerId");
const assignment_id = searchParams.get("assignmentId");
const tsid = searchParams.get("tsid");
- const turkSubmitTo = searchParams.get("turkSubmitTo");
- if (turkSubmitTo) {
- dispatch(setTurkSubmitTo(turkSubmitTo));
- }
-
- if (worker_id) {
- dispatch(setProductUserID(worker_id));
+ if (user?.product_user_id) {
+ dispatch(setProductUserID(user.product_user_id));
new WalletApi()
.getUserWalletBalanceProductIdWalletGet(
bpid, // productId
- worker_id, // bpuid
+ user.product_user_id,
)
.then((res) => {
const response = res.data as UserWalletBalanceResponse;