Browse Source

Refactor isAfter() with isFuture() and isPast()

pull/7389/head
Thomas Kaul 1 month ago
parent
commit
b666653096
  1. 4
      apps/client/src/app/components/investment-chart/investment-chart.component.ts

4
apps/client/src/app/components/investment-chart/investment-chart.component.ts

@ -41,7 +41,7 @@ import {
} from 'chart.js'; } from 'chart.js';
import 'chartjs-adapter-date-fns'; import 'chartjs-adapter-date-fns';
import { type AnnotationOptions } from 'chartjs-plugin-annotation'; import { type AnnotationOptions } from 'chartjs-plugin-annotation';
import { isAfter } from 'date-fns'; import { isFuture } from 'date-fns';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({ @Component({
@ -311,6 +311,6 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy {
return undefined; return undefined;
} }
return isAfter(new Date(xValue), new Date()) ? aValue : undefined; return isFuture(new Date(xValue)) ? aValue : undefined;
} }
} }

Loading…
Cancel
Save