From 0f1502fe4edf0879f5c258c70b82f243af1d4758 Mon Sep 17 00:00:00 2001 From: ARREY-ETTA BESSONG EKEP OBASI Date: Thu, 18 Apr 2024 03:21:50 +0100 Subject: [PATCH] feat: updated regex to support .jpeg --- .../EditNodeNameModal/Body/index.tsx | 7 +++-- .../EditNodeNameModal/Title/index.tsx | 26 ++++++------------- .../utils/__tests__/index.ts | 4 +++ .../EditNodeNameModal/utils/index.ts | 2 +- src/components/common/TextInput/index.tsx | 4 ++- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx b/src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx index 880b38543..d6c0083a5 100644 --- a/src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx +++ b/src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx @@ -108,6 +108,9 @@ export const Body = () => { const isNodeNameChanged = getValues().name && actualTopicNode?.name !== getValues().name + const shouldDisableSave = + loading || topicIsLoading || (!!imageUrl && !isValidImageUrl) || (!imageUrl && !isNodeNameChanged) + return ( @@ -116,7 +119,7 @@ export const Body = () => { ) : ( - + )} {