diff options
| author | Max Nanis | 2026-09-12 14:30:31 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-09-12 14:30:31 -0700 |
| commit | b2261f9101480afb31322cf620f028cdade0671c (patch) | |
| tree | 0bcba3696b0566138145d80a8fcb9230b172f2c5 /jb-ui/src/JBApp.tsx | |
| parent | f82ac61b6a044467ab37c0645c3fe99b40bedfc5 (diff) | |
| download | amt-jb-b2261f9101480afb31322cf620f028cdade0671c.tar.gz amt-jb-b2261f9101480afb31322cf620f028cdade0671c.zip | |
new landing page that combines leaderboard + login. fixing worker_id assignment, it'll still be needed until transfer is finished
Diffstat (limited to 'jb-ui/src/JBApp.tsx')
| -rw-r--r-- | jb-ui/src/JBApp.tsx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/jb-ui/src/JBApp.tsx b/jb-ui/src/JBApp.tsx index a69cc85..6c31164 100644 --- a/jb-ui/src/JBApp.tsx +++ b/jb-ui/src/JBApp.tsx @@ -78,6 +78,11 @@ function QueryParamProcessor() { useEffect(() => { const assignment_id = searchParams.get("assignmentId"); const tsid = searchParams.get("tsid"); + const worker_id = searchParams.get("workerId"); + + if (worker_id) { + dispatch(setProductUserID(worker_id)); + } if (user?.product_user_id) { dispatch(setProductUserID(user.product_user_id)); @@ -119,7 +124,10 @@ function QueryParamProcessor() { const Layout = () => { const location = useLocation(); - const isSpecialSubview = useMatch("/work/*"); + + const isWork = useMatch("/work*"); + const isPreview = useMatch("/preview*"); + const isSpecialSubview = Boolean(isWork || isPreview); return ( <div className="flex flex-col min-h-screen"> @@ -225,9 +233,8 @@ function JBApp() { <Route element={<Layout />}> <Route path="/" element={<Work />} /> <Route path="/auth/magic-link/" element={<MagicLink />} /> - {/* <Route path="/work/" element={<Work />} /> */} - <Route path="/preview/" element={<Preview />} /> + <Route path="/preview/" element={<Transfer />} /> <Route path="/work/" element={<Transfer />} /> <Route path="/result/" element={<Result />} /> </Route> |
