mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 11:51:14 -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("escalated", { ascending: false })
|
||||||
.order(
|
.order(
|
||||||
sort.config.field === 'created_at' ? 'submitted_at' :
|
|
||||||
sort.config.field === 'username' ? 'user_id' :
|
sort.config.field === 'username' ? 'user_id' :
|
||||||
sort.config.field,
|
sort.config.field,
|
||||||
{ ascending: sort.config.direction === 'asc' }
|
{ ascending: sort.config.direction === 'asc' }
|
||||||
@@ -799,7 +798,8 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
|||||||
|
|
||||||
pagination.reset();
|
pagination.reset();
|
||||||
fetchItems(true);
|
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
|
// Pagination changes trigger refetch
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user