Skip to content

Commit

Permalink
[frontend] handle startDate and endDate default values in query varia…
Browse files Browse the repository at this point in the history
…bles
  • Loading branch information
JeremyCloarec committed Nov 5, 2024
1 parent 89fec79 commit 4a775a9
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const PublicStixCoreObjectsMultiAreaChartComponent = ({
const PublicStixCoreObjectsMultiAreaChart = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -84,8 +84,8 @@ const PublicStixCoreObjectsMultiAreaChart = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const PublicStixCoreObjectsMultiHeatMapComponent = ({
const PublicStixCoreObjectsMultiHeatMap = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -90,8 +90,8 @@ const PublicStixCoreObjectsMultiHeatMap = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const PublicStixCoreObjectsMultiLineChartComponent = ({
const PublicStixCoreObjectsMultiLineChart = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -83,8 +83,8 @@ const PublicStixCoreObjectsMultiLineChart = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const PublicStixCoreObjectsMultiVerticalBarsComponent = ({
const PublicStixCoreObjectsMultiVerticalBars = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -84,8 +84,8 @@ const PublicStixCoreObjectsMultiVerticalBars = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const PublicStixRelationshipsMultiAreaChartComponent = ({
const PublicStixRelationshipsMultiAreaChart = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -84,8 +84,8 @@ const PublicStixRelationshipsMultiAreaChart = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const PublicStixRelationshipsMultiHeatMapComponent = ({
const PublicStixRelationshipsMultiHeatMap = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -90,8 +90,8 @@ const PublicStixRelationshipsMultiHeatMap = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const PublicStixRelationshipsMultiLineChartComponent = ({
const PublicStixRelationshipsMultiLineChart = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -83,8 +83,8 @@ const PublicStixRelationshipsMultiLineChart = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const PublicStixRelationshipsMultiVerticalBarsComponent = ({
const PublicStixRelationshipsMultiVerticalBars = ({
uriKey,
widget,
startDate = monthsAgo(12),
endDate = now(),
startDate,
endDate,
title,
}: PublicWidgetContainerProps) => {
const { t_i18n } = useFormatter();
Expand All @@ -84,8 +84,8 @@ const PublicStixRelationshipsMultiVerticalBars = ({
{
uriKey,
widgetId: id,
startDate,
endDate,
startDate: startDate ?? monthsAgo(12),
endDate: endDate ?? now(),
},
);

Expand Down

0 comments on commit 4a775a9

Please sign in to comment.