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 Apr 5, 2024
1 parent bc721e1 commit 9315ef1
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 9315ef1

Please sign in to comment.