diff options
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> |
