From ebd5c607584ce21a52684db1c91642be68fcf732 Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 17 Apr 2024 10:43:15 -0400 Subject: [PATCH] add query params back into admin redirect url w/ burnettk --- spiffworkflow-frontend/src/routes/AdminRedirect.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-frontend/src/routes/AdminRedirect.tsx b/spiffworkflow-frontend/src/routes/AdminRedirect.tsx index 064680f38..276ecbdc4 100644 --- a/spiffworkflow-frontend/src/routes/AdminRedirect.tsx +++ b/spiffworkflow-frontend/src/routes/AdminRedirect.tsx @@ -4,7 +4,9 @@ import { useNavigate } from 'react-router-dom'; export default function AdminRedirect() { const navigate = useNavigate(); useEffect(() => { - const newPath = window.location.pathname.replace(/^\/admin\//, '/'); + let newPath = window.location.pathname.replace(/^\/admin\//, '/'); + const queryParams = window.location.search; + newPath = `${newPath}${queryParams}`; navigate(newPath); }, [navigate]);