From 3baec7f21d96d4dd28e0b39376ce52985e38f562 Mon Sep 17 00:00:00 2001 From: Birk Johansson Date: Tue, 8 Oct 2024 15:24:13 +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 eba9acfe2..05a8771f1 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) => {