Files
tom goriunovandGitHub 5c0c18149d Move charts to toolkit and improve color mode hook (#3075)
* 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
2025-10-21 17:33:04 +02:00

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();
};