From 133522807da8fe9a453df650f8fd5684b38a20a1 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Fri, 27 Jun 2025 01:41:02 +0700 Subject: [PATCH] feat: total chars --- .../src/components/new-launch/editor.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/components/new-launch/editor.tsx b/apps/frontend/src/components/new-launch/editor.tsx index 9e8aba43..07c0f6d8 100644 --- a/apps/frontend/src/components/new-launch/editor.tsx +++ b/apps/frontend/src/components/new-launch/editor.tsx @@ -55,11 +55,11 @@ export const EditorWrapper: FC<{ setGlobalValue, setInternalValue, internalFromAll, - totalChars + totalChars, } = useLaunchStore( useShallow((state) => ({ internal: state.internal.find((p) => p.integration.id === state.current), - internalFromAll: state.integrations.find(p => p.id === state.current), + internalFromAll: state.integrations.find((p) => p.id === state.current), global: state.global, current: state.current, addRemoveInternal: state.addRemoveInternal, @@ -451,9 +451,16 @@ export const Editor: FC<{ /> )} -
props.totalChars && "!text-red-500")}> - {props.value.length}/{props.totalChars} -
+ {props.totalChars > 0 && ( +
props.totalChars && '!text-red-500' + )} + > + {props.value.length}/{props.totalChars} +
+ )} ); };