From fcf9a85be073ac972ce48cdd6fa37891c98684dd Mon Sep 17 00:00:00 2001 From: Nevo David Date: Fri, 27 Dec 2024 15:44:39 +0700 Subject: [PATCH] feat: fix scrollbar --- .../src/components/launches/editor.tsx | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/apps/frontend/src/components/launches/editor.tsx b/apps/frontend/src/components/launches/editor.tsx index ede9d1ab..dd6343ca 100644 --- a/apps/frontend/src/components/launches/editor.tsx +++ b/apps/frontend/src/components/launches/editor.tsx @@ -1,7 +1,6 @@ import { forwardRef } from 'react'; import type { MDEditorProps } from '@uiw/react-md-editor/src/Types'; import { RefMDEditor } from '@uiw/react-md-editor/src/Editor'; -import MDEditor from '@uiw/react-md-editor'; import { useCopilotAction, useCopilotReadable } from '@copilotkit/react-core'; import { CopilotTextarea } from '@copilotkit/react-textarea'; import clsx from 'clsx'; @@ -41,24 +40,21 @@ export const Editor = forwardRef< return (
- {user?.tier?.ai ? ( - props?.onChange?.(e.target.value)} - onPaste={props.onPaste} - placeholder="Write your reply..." - autosuggestionsConfig={{ - textareaPurpose: `Assist me in writing social media posts.`, - chatApiConfigs: {}, - }} - /> - ) : ( - - )} + props?.onChange?.(e.target.value)} + onPaste={props.onPaste} + placeholder="Write your reply..." + autosuggestionsConfig={{ + textareaPurpose: `Assist me in writing social media posts.`, + chatApiConfigs: {}, + disabled: !user?.tier?.ai, + }} + />
); }