From a3a41354193a8fef8d7baa57989af5d4d05046c0 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Mon, 30 Oct 2023 11:37:23 +0100 Subject: [PATCH] refactor: rename useHasFieldValue to useIsFieldValueUnique --- src/pages/dataElements/form/fields.tsx | 6 +++--- .../form/{useHasFieldValue.ts => useIsFieldValueUnique.ts} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/pages/dataElements/form/{useHasFieldValue.ts => useIsFieldValueUnique.ts} (96%) diff --git a/src/pages/dataElements/form/fields.tsx b/src/pages/dataElements/form/fields.tsx index 4180be60..5d5dd74c 100644 --- a/src/pages/dataElements/form/fields.tsx +++ b/src/pages/dataElements/form/fields.tsx @@ -23,14 +23,14 @@ import { AGGREGATION_TYPE, DOMAIN_TYPE, VALUE_TYPE } from '../../../constants' import { useSchemas } from '../../../lib' import classes from './customFields.module.css' import { EditableFieldWrapper } from './EditableFieldWrapper' -import { useHasFieldValue } from './useHasFieldValue' +import { useIsFieldValueUnique } from './useIsFieldValueUnique' export function NameField() { const { loading, fetching, refetch: checkIsValueTaken, - } = useHasFieldValue('name') + } = useIsFieldValueUnique('name') return ( (HAS_FIELD_VALUE_QUERY, { lazy: true, variables: { field, value: '' },