Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { getPhoneCodeByTimezone } from 'timezone-phone-codes';
|
||||
import ct from 'countries-and-timezones';
|
||||
|
||||
const getTimezone = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
export const getActiveDialCode = () => {
|
||||
return getPhoneCodeByTimezone(getTimezone()) || '';
|
||||
};
|
||||
|
||||
export const getActiveCountryCode = () => {
|
||||
const country = ct.getCountryForTimezone(getTimezone()) || {};
|
||||
return country.id || '';
|
||||
};
|
||||
Reference in New Issue
Block a user