From 2be9bb6267bffc59adb506051b2f33fb57cf8b1e Mon Sep 17 00:00:00 2001 From: danfunk Date: Wed, 31 May 2023 10:28:16 -0400 Subject: [PATCH] just reuse allowRedirect. --- spiffworkflow-frontend/src/components/ProcessInterstitial.tsx | 4 +--- spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx b/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx index 3c06d05e4..2face3311 100644 --- a/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx @@ -15,14 +15,12 @@ type OwnProps = { processInstanceId: number; processInstanceShowPageUrl: string; allowRedirect: boolean; - redirectToHomeWhenNoTasks?: boolean; }; export default function ProcessInterstitial({ processInstanceId, allowRedirect, processInstanceShowPageUrl, - redirectToHomeWhenNoTasks = true, }: OwnProps) { const [data, setData] = useState([]); const [lastTask, setLastTask] = useState(null); @@ -162,7 +160,7 @@ export default function ProcessInterstitial({ /** In the event there is no task information and the connection closed, * redirect to the home page. */ - if (state === 'CLOSED' && lastTask === null && redirectToHomeWhenNoTasks) { + if (state === 'CLOSED' && lastTask === null && allowRedirect) { navigate(`/tasks`); } diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index 74b8bb056..ca7968a2b 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -1113,7 +1113,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {