mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 13:11:12 -05:00
Fix: Implement moderation queue sorting fixes
This commit is contained in:
@@ -224,7 +224,6 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
)
|
||||
.order("escalated", { ascending: false })
|
||||
.order(
|
||||
sort.config.field === 'created_at' ? 'submitted_at' :
|
||||
sort.config.field === 'username' ? 'user_id' :
|
||||
sort.config.field,
|
||||
{ ascending: sort.config.direction === 'asc' }
|
||||
@@ -799,7 +798,8 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
|
||||
pagination.reset();
|
||||
fetchItems(true);
|
||||
}, [sort.config.field, sort.config.direction]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [sort.config.field, sort.config.direction, pagination.reset, fetchItems]);
|
||||
|
||||
// Pagination changes trigger refetch
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user