diff --git a/src/features/projects/ProjectAndViewNav.jsx b/src/features/projects/ProjectAndViewNav.jsx index f01e1181..8cf06950 100644 --- a/src/features/projects/ProjectAndViewNav.jsx +++ b/src/features/projects/ProjectAndViewNav.jsx @@ -17,6 +17,7 @@ import { selectRouterLocation, fetchImageContext, preFocusImageStart, + clearImages, } from '../images/imagesSlice.js'; import { NavigationMenu, @@ -207,6 +208,7 @@ const ProjectAndViewNav = () => { if (projId === selectedProj._id) return; const project = projects.find((p) => p._id === projId); const viewId = project.views.find((v) => v.name === 'All images')._id; + dispatch(clearImages()); dispatch(push(`/app/${projId}/${viewId}`)); };