feat: simplify field preview logic in Settings (#5541)

Closes #5382

TODO:

- [x] Test all field previews in app
- [x] Fix tests
- [x] Fix JSON preview
This commit is contained in:
Thaïs
2024-05-24 18:06:57 +02:00
committed by GitHub
parent 1ae7fbe90d
commit c7d61e183a
33 changed files with 1184 additions and 510 deletions

View File

@ -8,6 +8,8 @@ import { logError } from './logError';
export const DEFAULT_DATE_LOCALE = 'en-EN';
export const parseDate = (dateToParse: Date | string | number) => {
if (dateToParse === 'now') return DateTime.fromJSDate(new Date());
let formattedDate: DateTime | null = null;
if (!dateToParse) {