Skip to content

Commit

Permalink
🐛Removed routing state update when scrolling gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
shepilov committed Jun 5, 2024
1 parent df775f0 commit 90876e0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tdrive/frontend/src/app/views/client/viewer/drive-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 90876e0

Please sign in to comment.