14
resources/client/admin/reports/insights/insights-charts-context.ts
Executable file
14
resources/client/admin/reports/insights/insights-charts-context.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import React, {useContext} from 'react';
|
||||
import {DateRangeValue} from '@common/ui/forms/input-field/date/date-range-picker/date-range-value';
|
||||
|
||||
export interface InsightsChartsContextValue {
|
||||
dateRange: DateRangeValue;
|
||||
model: string;
|
||||
}
|
||||
|
||||
export const InsightsChartsContext =
|
||||
React.createContext<InsightsChartsContextValue>(null!);
|
||||
|
||||
export function useInsightsChartContext() {
|
||||
return useContext(InsightsChartsContext);
|
||||
}
|
||||
Reference in New Issue
Block a user