pl-fe: do not drop search params when opening modal

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

View File

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