(null);
const [loading, setLoading] = useState(false);
@@ -86,6 +87,7 @@ export function NotificationSearchPage() {
type: type || undefined,
startDate: dateFrom || undefined,
endDate: dateTo || undefined,
+ sortBy,
};
}, [
debouncedQuery,
@@ -96,6 +98,7 @@ export function NotificationSearchPage() {
type,
dateFrom,
dateTo,
+ sortBy,
]);
const runSearch = useCallback(async () => {
@@ -127,7 +130,7 @@ export function NotificationSearchPage() {
}, [currentFilters, page, hasParams]);
// Re-run search whenever debounced params change; reset page when filters change
- const filtersKey = `${debouncedQuery}|${debouncedSender}|${debouncedTxHash}|${debouncedEventId}|${status}|${type}|${dateFrom}|${dateTo}`;
+ const filtersKey = `${debouncedQuery}|${debouncedSender}|${debouncedTxHash}|${debouncedEventId}|${status}|${type}|${dateFrom}|${dateTo}|${sortBy}`;
const prevFiltersRef = useRef(filtersKey);
useEffect(() => {
if (filtersKey !== prevFiltersRef.current) {
@@ -149,6 +152,7 @@ export function NotificationSearchPage() {
setType('');
setDateFrom('');
setDateTo('');
+ setSortBy('newest');
setPage(1);
setResponse(null);
setError(null);
@@ -274,6 +278,22 @@ export function NotificationSearchPage() {
+ {/* Sort control (#495) */}
+
+
+
+
+