pl-fe: do not drop search params when opening modal but also don't break modals

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-04-11 12:33:28 +02:00
parent f51d736df3
commit a3eb6fc61a

View File

@ -141,7 +141,7 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
const ensureHistoryBuffer = () => {
const { state } = history.location;
if (!state || (state as any).plFeModalKey !== modalHistoryKey.current) {
history.push(history.location, { ...(state as any), plFeModalKey: modalHistoryKey.current });
history.push({ ...history.location, state: { ...(state as any), plFeModalKey: modalHistoryKey.current } });
}
};