mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-05 06:04:32 +00:00
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…
x
Reference in New Issue
Block a user