Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: total chars

Nevo David133522807da8
diff --git a/apps/frontend/src/components/new-launch/editor.tsx b/apps/frontend/src/components/new-launch/editor.tsx
index 9e8aba438..07c0f6d8a 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<{
/>
)}
</div>
- <div className={clsx("text-end text-sm mt-1", props.value.length > props.totalChars && "!text-red-500")}>
- {props.value.length}/{props.totalChars}
- </div>
+ {props.totalChars > 0 && (
+ <div
+ className={clsx(
+ 'text-end text-sm mt-1',
+ props.value.length > props.totalChars && '!text-red-500'
+ )}
+ >
+ {props.value.length}/{props.totalChars}
+ </div>
+ )}
</>
);
};