Skip to content

Commit 1335228

Browse files
committed
feat: total chars
1 parent 91f6d7a commit 1335228

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

apps/frontend/src/components/new-launch/editor.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ export const EditorWrapper: FC<{
5555
setGlobalValue,
5656
setInternalValue,
5757
internalFromAll,
58-
totalChars
58+
totalChars,
5959
} = useLaunchStore(
6060
useShallow((state) => ({
6161
internal: state.internal.find((p) => p.integration.id === state.current),
62-
internalFromAll: state.integrations.find(p => p.id === state.current),
62+
internalFromAll: state.integrations.find((p) => p.id === state.current),
6363
global: state.global,
6464
current: state.current,
6565
addRemoveInternal: state.addRemoveInternal,
@@ -451,9 +451,16 @@ export const Editor: FC<{
451451
/>
452452
)}
453453
</div>
454-
<div className={clsx("text-end text-sm mt-1", props.value.length > props.totalChars && "!text-red-500")}>
455-
{props.value.length}/{props.totalChars}
456-
</div>
454+
{props.totalChars > 0 && (
455+
<div
456+
className={clsx(
457+
'text-end text-sm mt-1',
458+
props.value.length > props.totalChars && '!text-red-500'
459+
)}
460+
>
461+
{props.value.length}/{props.totalChars}
462+
</div>
463+
)}
457464
</>
458465
);
459466
};

0 commit comments

Comments
 (0)