mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* move charts to toolkit * refactor imports * fix tests * change the behavior of the color mode hook and add the noWatermark prop * fix gas tracker test and fix toolkit build
10 lines
310 B
TypeScript
10 lines
310 B
TypeScript
import type { TimeChartItem } from 'toolkit/components/charts/types';
|
|
|
|
export function formatDate(date: Date) {
|
|
return date.toISOString().substring(0, 10);
|
|
}
|
|
|
|
export const sortByDateDesc = (a: Pick<TimeChartItem, 'date'>, b: Pick<TimeChartItem, 'date'>) => {
|
|
return a.date.getTime() - b.date.getTime();
|
|
};
|