make sure that recent view always sorts by opened_at even if not available as sort option in UI

This commit is contained in:
Mary Hipp
2025-03-13 09:18:04 -04:00
committed by Mary Hipp Rogers
parent e5591d145f
commit df18fe0298

View File

@@ -39,6 +39,10 @@ export const workflowLibrarySlice = createSlice({
workflowLibraryViewChanged: (state, action: PayloadAction<WorkflowLibraryState['view']>) => {
state.view = action.payload;
state.searchTerm = '';
if (action.payload === 'recent') {
state.orderBy = 'opened_at';
state.direction = 'DESC';
}
},
workflowLibraryTagToggled: (state, action: PayloadAction<string>) => {
const tag = action.payload;