fix(ui): open viewer on image click, not select

This commit is contained in:
psychedelicious
2024-05-04 14:42:29 +10:00
committed by Kent Keirsey
parent 8794b99d51
commit 5cb1ff8679
2 changed files with 2 additions and 3 deletions

View File

@@ -31,11 +31,9 @@ export const gallerySlice = createSlice({
reducers: {
imageSelected: (state, action: PayloadAction<ImageDTO | null>) => {
state.selection = action.payload ? [action.payload] : [];
state.isImageViewerOpen = true;
},
selectionChanged: (state, action: PayloadAction<ImageDTO[]>) => {
state.selection = uniqBy(action.payload, (i) => i.image_name);
state.isImageViewerOpen = true;
},
shouldAutoSwitchChanged: (state, action: PayloadAction<boolean>) => {
state.shouldAutoSwitch = action.payload;