Files
explore/ui/nameDomain/history/utils.ts
T
Zach Kelling d15691316a feat: rename @blockscout to @luxfi, monochrome theme, horizontal blocks
- Rename all @blockscout/* npm packages to @luxfi/* aliases (150+ files)
- Override blue accent colors to gray for monochrome theme
- Fix dropdown/menu/popover fonts to use Geist Sans
- Change Latest Blocks to horizontal scrolling layout
- Show dashes instead of zeros for validator stats on error
- Fix GHA deploy step to use correct deployment name
2026-03-02 12:28:15 -08:00

28 lines
794 B
TypeScript

import type * as bens from '@luxfi/bens-types';
import getNextSortValueShared from 'ui/shared/sort/getNextSortValue';
export type SortField = 'timestamp';
export type Sort = `${ SortField }-asc` | `${ SortField }-desc` | 'default';
const SORT_SEQUENCE: Record<SortField, Array<Sort>> = {
timestamp: [ 'timestamp-desc', 'timestamp-asc', 'default' ],
};
export const getNextSortValue = (getNextSortValueShared<SortField, Sort>).bind(undefined, SORT_SEQUENCE);
export const sortFn = (sort: Sort | undefined) => (a: bens.DomainEvent, b: bens.DomainEvent) => {
switch (sort) {
case 'timestamp-asc': {
return b.timestamp.localeCompare(a.timestamp);
}
case 'timestamp-desc': {
return a.timestamp.localeCompare(b.timestamp);
}
default:
return 0;
}
};