Skip to content

Commit

Permalink
fix(history): not displaying dates in legend
Browse files Browse the repository at this point in the history
This will fix dates failing to display in history legend
This was due to missing search params for dates
Now we get it from redux store.
If no search params found default one will be used

Signed-off-by: Danil Kostromin <[email protected]>
  • Loading branch information
Danil Kostromin committed Mar 27, 2024
1 parent 738c23d commit 68799da
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import { queryToHistorySearchState } from '../slice/history-slice.utils';

export const getLegendItems = (search: HistoryAPIQuery): LegendItem[] => {
const state = queryToHistorySearchState(search);

const formattedDate = `${formatTimeToDot(
search.startDate
)}${formatTimeToDot(search.finishDate)}`;
state.startDate.toISOString()
)}${formatTimeToDot(state.finishDate.toISOString())}`;

return [
{
Expand Down

0 comments on commit 68799da

Please sign in to comment.