Files
zeekay da79f9e711 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

55 lines
1.1 KiB
TypeScript

import { Resolution } from '@luxfi/stats-types';
import type { StatsIntervalIds } from 'types/client/stats';
export const STATS_RESOLUTIONS: Array<{ id: Resolution; title: string }> = [
{
id: Resolution.DAY,
title: 'Day',
},
{
id: Resolution.WEEK,
title: 'Week',
},
{
id: Resolution.MONTH,
title: 'Month',
},
{
id: Resolution.YEAR,
title: 'Year',
},
];
export const STATS_INTERVALS: { [key in StatsIntervalIds]: { title: string; shortTitle: string; start?: Date } } = {
all: {
title: 'All time',
shortTitle: 'All time',
},
oneMonth: {
title: '1 month',
shortTitle: '1M',
start: getStartDateInPast(1),
},
threeMonths: {
title: '3 months',
shortTitle: '3M',
start: getStartDateInPast(3),
},
sixMonths: {
title: '6 months',
shortTitle: '6M',
start: getStartDateInPast(6),
},
oneYear: {
title: '1 year',
shortTitle: '1Y',
start: getStartDateInPast(12),
},
};
function getStartDateInPast(months: number): Date {
const date = new Date();
date.setMonth(date.getMonth() - months);
return date;
}