* ESLint rule: const naming Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * Refactor according to review Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> * refactor: Reverts changes on `twenty-server` Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> Co-authored-by: v1b3m <vibenjamin6@gmail.com> --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>
11 lines
553 B
TypeScript
11 lines
553 B
TypeScript
import { AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL } from '@/settings/accounts/constants/AvailableTimezoneOptionsByLabel';
|
|
import { formatTimeZoneLabel } from '@/settings/accounts/utils/formatTimeZoneLabel';
|
|
|
|
/**
|
|
* Finds the matching available IANA time zone select option from a given IANA time zone.
|
|
* @param value the IANA time zone to match
|
|
* @returns the matching available IANA time zone select option or undefined
|
|
*/
|
|
export const findAvailableTimeZoneOption = (value: string) =>
|
|
AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL[formatTimeZoneLabel(value)];
|