1 import type { EnvironmentExtended } from '@proton/shared/lib/interfaces';
2 import type { SpotlightDate } from '@proton/shared/lib/spotlight/interface';
4 export const getEnvironmentDate = (
5 currentEnvironment: EnvironmentExtended | undefined,
6 spotlightDates: SpotlightDate
8 if (currentEnvironment) {
9 const environmentDate = spotlightDates[currentEnvironment];
10 if (environmentDate !== undefined) {
11 return environmentDate;
14 return spotlightDates.default;