Skip to content

Commit

Permalink
Update app/scripts/components/common/browse-controls/use-browse-contr…
Browse files Browse the repository at this point in the history
…ols.ts

Co-authored-by: Daniel da Silva <[email protected]>
  • Loading branch information
sandrahoang686 and danielfdsilva authored Oct 23, 2023
1 parent a90b944 commit 54fd72e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export function useBrowserControls({ sortOptions }: BrowseControlsHookParams) {
const [sortField, setSortField] = useQsState.memo(
{
key: Actions.SORT_FIELD,
default: sortOptions[1]?.id || sortOptions[0]?.id, // If pubDate exists, default sorting to this
// If pubDate exists, default sorting to this
default: sortOptions.find((o) => o.id === 'pubDate')?.id || sortOptions[0]?.id,
validator: sortOptions.map((d) => d.id)
},
[sortOptions]
Expand Down

0 comments on commit 54fd72e

Please sign in to comment.