add query params back into admin redirect url w/ burnettk
This commit is contained in:
parent
618945ce61
commit
ebd5c60758
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue