From 475225c670cd08a66c3d83a85686c60d65e0e339 Mon Sep 17 00:00:00 2001 From: Birk Johansson Date: Tue, 8 Oct 2024 15:22:55 +0200 Subject: [PATCH] fix(datefield): useSystemSettings instead of settings --- src/components/form/fields/DateField.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/form/fields/DateField.tsx b/src/components/form/fields/DateField.tsx index 20d13cdf..3d01e54f 100644 --- a/src/components/form/fields/DateField.tsx +++ b/src/components/form/fields/DateField.tsx @@ -1,7 +1,7 @@ import { CalendarInput, CalendarInputProps } from '@dhis2/ui' import React from 'react' import { useField } from 'react-final-form' -import { selectedLocale, useSystemSettings } from '../../../lib' +import { selectedLocale, useSystemSetting } from '../../../lib' type DateFieldProps = Omit< CalendarInputProps, @@ -16,8 +16,7 @@ export function DateField({ label, ...calendarInputProps }: DateFieldProps) { - const settings = useSystemSettings() - const { keyCalendar: calendar } = settings + const calendar = useSystemSetting('keyCalendar') const locale = selectedLocale const { meta, input } = useField(name, { format: (value) => {