()
| 77 | } |
| 78 | |
| 79 | export function useContentSort() { |
| 80 | function getContentSortQuery(spaceId: SortableContentSpaceId) { |
| 81 | return { ...contentSortState[spaceId] } |
| 82 | } |
| 83 | |
| 84 | function setContentSortField( |
| 85 | spaceId: SortableContentSpaceId, |
| 86 | sort: ContentSortField, |
| 87 | ) { |
| 88 | contentSortState[spaceId].sort = sort |
| 89 | } |
| 90 | |
| 91 | function setContentSortOrder( |
| 92 | spaceId: SortableContentSpaceId, |
| 93 | order: ContentSortOrder, |
| 94 | ) { |
| 95 | contentSortState[spaceId].order = order |
| 96 | } |
| 97 | |
| 98 | return { |
| 99 | contentSortState, |
| 100 | getContentSortQuery, |
| 101 | setContentSortField, |
| 102 | setContentSortOrder, |
| 103 | } |
| 104 | } |
no outgoing calls
no test coverage detected