Files
twenty_crm/front/src/modules/utils/utils.ts
Charles Bochet 8a330b9746 Use Graphql types in FE and complete mappers removal (#348)
Fix Typescript build issues
2023-06-21 10:52:00 -07:00

16 lines
443 B
TypeScript

export const humanReadableDate = (date: Date) => {
return new Intl.DateTimeFormat(undefined, {
month: 'short',
day: 'numeric',
year: 'numeric',
}).format(date);
};
export const getLogoUrlFromDomainName = (domainName?: string): string => {
return `https://api.faviconkit.com/${domainName}/144`;
};
export const browserPrefersDarkMode = (): boolean => {
return window.matchMedia('(prefers-color-scheme: dark)').matches;
};