From f0a5b4142537f334faddcb903ac7016622b3f3ce Mon Sep 17 00:00:00 2001 From: jbirddog <100367399+jbirddog@users.noreply.github.com> Date: Tue, 15 Nov 2022 10:52:39 -0500 Subject: [PATCH] Navigate to my task (#35) --- src/routes/ProcessModelShow.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/routes/ProcessModelShow.tsx b/src/routes/ProcessModelShow.tsx index 1885e6d..9c1fa8c 100644 --- a/src/routes/ProcessModelShow.tsx +++ b/src/routes/ProcessModelShow.tsx @@ -132,20 +132,11 @@ export default function ProcessModelShow() { const processInstanceResultTag = () => { if (processModel && processInstanceResult) { - let takeMeToMyTaskBlurb = null; // FIXME: ensure that the task is actually for the current user as well const processInstanceId = (processInstanceResult as any).id; const nextTask = (processInstanceResult as any).next_task; if (nextTask && nextTask.state === 'READY') { - takeMeToMyTaskBlurb = ( - - You have a task to complete. Go to{' '} - - my task - - . - - ); + navigate(`/tasks/${processInstanceId}/${nextTask.id}`); } return (