🐛Removed routing state update when scrolling gallery

This commit is contained in:
Anton SHEPILOV
2024-06-05 17:20:48 +02:00
committed by Anton Shepilov
parent df775f0b57
commit 90876e0094
@@ -78,15 +78,18 @@ export const DrivePreview: React.FC<DrivePreviewProps> = ({ items }) => {
if (loading) {
animationTimeout = window.setTimeout(() => {
setModalLoading(false);
}, 400);
}, 100);
}
}, [loading]);
const switchPreview = async (item: DriveItem) => {
close();
history.push(
RouterServices.generateRouteFromState({ companyId: company, itemId: item.id, }),
);
//TODO[ASH] fix state management for this component
//right now changing the routing leads to a lot of components rerender
//and galery become unusable
// history.push(
// RouterServices.generateRouteFromState({ companyId: company, itemId: item.id, }),
// );
open(item);
};
return (