From dd8beb7e4c82010ea7ca8dfb13b8d86a5b4e6348 Mon Sep 17 00:00:00 2001 From: Jason Bahl Date: Wed, 20 Dec 2023 11:50:11 -0700 Subject: [PATCH] - update AcfFieldTypeSettingsBlock to return a default card when FieldTypeSettings have not been configured for a field type --- wp-blocks/AcfFieldTypeSettingsBlock.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wp-blocks/AcfFieldTypeSettingsBlock.js b/wp-blocks/AcfFieldTypeSettingsBlock.js index 0d5a2bc..bf5ad7c 100644 --- a/wp-blocks/AcfFieldTypeSettingsBlock.js +++ b/wp-blocks/AcfFieldTypeSettingsBlock.js @@ -48,6 +48,17 @@ export function AcfFieldTypeSettingsBlock({ fieldTypeSettingsBlockFields }) { } }; + + if ( ! fieldTypeSettings?.nodes?.length ) { + return ( + + + Field Type Settings not yet configured for this field type + + + ); + } + return ( <> @@ -77,7 +88,7 @@ export function AcfFieldTypeSettingsBlock({ fieldTypeSettingsBlockFields }) {