Skip to content

Commit

Permalink
fix: set default sort to date_added_to_graph when no search params pr…
Browse files Browse the repository at this point in the history
…esent
  • Loading branch information
Ekep-Obasi committed Dec 21, 2024
1 parent c16b233 commit 58b2802
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stores/useDataStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export const useDataStore = create<DataStore>()(
...(filterNodeTypes.length > 0 ? { node_type: JSON.stringify(filterNodeTypes) } : {}),
...(word ? { word } : {}),
...(aiRefId && AISearchQuery ? { previous_search_ref_id: aiRefId } : {}),
...(!word && !AISearchQuery ? { sort_by: 'date_added_to_graph' } : {}),
}

try {
Expand Down

0 comments on commit 58b2802

Please sign in to comment.