From 79b2831abc721b67c11e12ecab41ac306e5e08f2 Mon Sep 17 00:00:00 2001 From: Rares Mardare Date: Wed, 5 Oct 2022 12:19:46 +0300 Subject: [PATCH] refactored --- .../src/containers/UsersTimezones/UsersTimezones.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grafana-plugin/src/containers/UsersTimezones/UsersTimezones.tsx b/grafana-plugin/src/containers/UsersTimezones/UsersTimezones.tsx index 231673e2..a58255b5 100644 --- a/grafana-plugin/src/containers/UsersTimezones/UsersTimezones.tsx +++ b/grafana-plugin/src/containers/UsersTimezones/UsersTimezones.tsx @@ -316,9 +316,7 @@ function getColorSchemeMappingForUsers(store: RootStore, scheduleId: string): { const startMoment = getStartOfWeek(store.currentTimezone); const shifts = getShiftsFromStore(store, scheduleId, startMoment, false); - const layers = getLayersFromStore(store, scheduleId, startMoment); - const overrides = getOverridesFromStore(store, scheduleId, startMoment, false); const usersColorSchemeHash: { [userId: string]: Set } = {}; @@ -327,8 +325,10 @@ function getColorSchemeMappingForUsers(store: RootStore, scheduleId: string): { return usersColorSchemeHash; } - shifts.forEach(({ shiftId, events }) => populateUserHashSet(events, shiftId, false)); - shifts.forEach(({ events }, rotationIndex) => populateUserHashSet(events, rotationIndex, true)); + shifts.forEach(({ shiftId, events }, rotationIndex) => { + populateUserHashSet(events, shiftId, false); + populateUserHashSet(events, rotationIndex, true); + }); return usersColorSchemeHash;