pass editor to thread view component
This commit is contained in:
parent
c4bf52ab7f
commit
054064a543
2 changed files with 8 additions and 4 deletions
|
|
@ -74,7 +74,11 @@ export function ThreadView({ threadTimeline, threadFocusRef, requestClose }: Thr
|
|||
</Box>
|
||||
</PageHeader>
|
||||
|
||||
<TimelineView threadTimeline={threadTimeline} threadInputRef={threadInputRef} />
|
||||
<TimelineView
|
||||
threadTimeline={threadTimeline}
|
||||
threadInputRef={threadInputRef}
|
||||
editor={editor}
|
||||
/>
|
||||
<Box shrink="No" direction="Column">
|
||||
<div style={{ padding: `0 ${config.space.S400}` }}>
|
||||
<RoomInput
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import React, {
|
|||
useState,
|
||||
} from 'react';
|
||||
import { ReactEditor } from 'slate-react';
|
||||
import { Editor } from 'slate';
|
||||
import { Box, Scroll, Text, config } from 'folds';
|
||||
import { MessageEventWithoutRoomId } from 'neurone/lib/api/types';
|
||||
import { useVirtualPaginator } from '../../../hooks/useVirtualPaginator';
|
||||
|
|
@ -60,7 +61,6 @@ import {
|
|||
useUsernameClickHandler,
|
||||
} from '../hooks/useTimeline';
|
||||
import { rContent } from '../../../../client/reader';
|
||||
import { useEditor } from '../../../components/editor';
|
||||
import {
|
||||
TimelineFloat,
|
||||
JumpToLatestButton,
|
||||
|
|
@ -78,15 +78,15 @@ import { useSendReaction } from '../hooks/useSendReaction';
|
|||
type TimelineViewProps = {
|
||||
threadTimeline: ThreadTimeline;
|
||||
threadInputRef: RefObject<HTMLElement>;
|
||||
editor: Editor;
|
||||
};
|
||||
|
||||
const PAGINATION_LIMIT = 80;
|
||||
|
||||
export function TimelineView({ threadTimeline, threadInputRef }: TimelineViewProps) {
|
||||
export function TimelineView({ threadTimeline, threadInputRef, editor }: TimelineViewProps) {
|
||||
const ct = useClient();
|
||||
const roomId = useRoom();
|
||||
const encryptedRooms = useObservableValue(ct.encryptedRooms);
|
||||
const editor = useEditor();
|
||||
|
||||
const {
|
||||
hideActivity,
|
||||
|
|
|
|||
Loading…
Reference in a new issue