Skip to content

Commit fcf9a85

Browse files
committed
feat: fix scrollbar
1 parent 637c5f9 commit fcf9a85

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

apps/frontend/src/components/launches/editor.tsx

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { forwardRef } from 'react';
22
import type { MDEditorProps } from '@uiw/react-md-editor/src/Types';
33
import { RefMDEditor } from '@uiw/react-md-editor/src/Editor';
4-
import MDEditor from '@uiw/react-md-editor';
54
import { useCopilotAction, useCopilotReadable } from '@copilotkit/react-core';
65
import { CopilotTextarea } from '@copilotkit/react-textarea';
76
import clsx from 'clsx';
@@ -41,24 +40,21 @@ export const Editor = forwardRef<
4140

4241
return (
4342
<div className="relative bg-customColor2">
44-
{user?.tier?.ai ? (
45-
<CopilotTextarea
46-
disableBranding={true}
47-
className={clsx(
48-
'!min-h-40 !max-h-80 p-2 overflow-hidden bg-customColor2 outline-none'
49-
)}
50-
value={props.value}
51-
onChange={(e) => props?.onChange?.(e.target.value)}
52-
onPaste={props.onPaste}
53-
placeholder="Write your reply..."
54-
autosuggestionsConfig={{
55-
textareaPurpose: `Assist me in writing social media posts.`,
56-
chatApiConfigs: {},
57-
}}
58-
/>
59-
) : (
60-
<MDEditor {...props} ref={ref} />
61-
)}
43+
<CopilotTextarea
44+
disableBranding={true}
45+
className={clsx(
46+
'!min-h-40 !max-h-80 p-2 overflow-x-hidden scrollbar scrollbar-thumb-[#612AD5] bg-customColor2 outline-none'
47+
)}
48+
value={props.value}
49+
onChange={(e) => props?.onChange?.(e.target.value)}
50+
onPaste={props.onPaste}
51+
placeholder="Write your reply..."
52+
autosuggestionsConfig={{
53+
textareaPurpose: `Assist me in writing social media posts.`,
54+
chatApiConfigs: {},
55+
disabled: !user?.tier?.ai,
56+
}}
57+
/>
6258
</div>
6359
);
6460
}

0 commit comments

Comments
 (0)