mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-21 18:55:16 +02:00
chore: fix formatting
This commit is contained in:
parent
7c8e269190
commit
eb6192d480
2 changed files with 45 additions and 46 deletions
|
|
@ -127,7 +127,8 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
|
||||||
}, [mentionedDocs]);
|
}, [mentionedDocs]);
|
||||||
|
|
||||||
// Create a chip element for a document
|
// Create a chip element for a document
|
||||||
const createChipElement = useCallback((doc: MentionedDocument): HTMLSpanElement => {
|
const createChipElement = useCallback(
|
||||||
|
(doc: MentionedDocument): HTMLSpanElement => {
|
||||||
const chip = document.createElement("span");
|
const chip = document.createElement("span");
|
||||||
chip.setAttribute(CHIP_DATA_ATTR, "true");
|
chip.setAttribute(CHIP_DATA_ATTR, "true");
|
||||||
chip.setAttribute(CHIP_ID_ATTR, String(doc.id));
|
chip.setAttribute(CHIP_ID_ATTR, String(doc.id));
|
||||||
|
|
@ -167,7 +168,9 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
|
||||||
chip.appendChild(removeBtn);
|
chip.appendChild(removeBtn);
|
||||||
|
|
||||||
return chip;
|
return chip;
|
||||||
}, [focusAtEnd, onDocumentRemove]);
|
},
|
||||||
|
[focusAtEnd, onDocumentRemove]
|
||||||
|
);
|
||||||
|
|
||||||
// Insert a document chip at the current cursor position
|
// Insert a document chip at the current cursor position
|
||||||
const insertDocumentChip = useCallback(
|
const insertDocumentChip = useCallback(
|
||||||
|
|
@ -491,4 +494,3 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
|
||||||
);
|
);
|
||||||
|
|
||||||
InlineMentionEditor.displayName = "InlineMentionEditor";
|
InlineMentionEditor.displayName = "InlineMentionEditor";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -558,10 +558,7 @@ const Composer: FC = () => {
|
||||||
<ComposerPrimitive.AttachmentDropzone className="aui-composer-attachment-dropzone flex w-full flex-col rounded-2xl border-input bg-muted px-1 pt-2 outline-none transition-shadow data-[dragging=true]:border-ring data-[dragging=true]:border-dashed data-[dragging=true]:bg-accent/50">
|
<ComposerPrimitive.AttachmentDropzone className="aui-composer-attachment-dropzone flex w-full flex-col rounded-2xl border-input bg-muted px-1 pt-2 outline-none transition-shadow data-[dragging=true]:border-ring data-[dragging=true]:border-dashed data-[dragging=true]:bg-accent/50">
|
||||||
<ComposerAttachments />
|
<ComposerAttachments />
|
||||||
{/* -------- Inline Mention Editor -------- */}
|
{/* -------- Inline Mention Editor -------- */}
|
||||||
<div
|
<div ref={editorContainerRef} className="aui-composer-input-wrapper px-3 pt-3 pb-6">
|
||||||
ref={editorContainerRef}
|
|
||||||
className="aui-composer-input-wrapper px-3 pt-3 pb-6"
|
|
||||||
>
|
|
||||||
<InlineMentionEditor
|
<InlineMentionEditor
|
||||||
ref={editorRef}
|
ref={editorRef}
|
||||||
placeholder="Ask SurfSense (type @ to mention docs)"
|
placeholder="Ask SurfSense (type @ to mention docs)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue