Skip to content

Commit f388496

Browse files
committed
fix: 파일및 함수명 변경
1 parent c9a8c83 commit f388496

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

client/src/features/editor/Editor.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { useComposition } from "./hooks/useComposition.ts";
1313
import { useCopyAndPaste } from "./hooks/useCopyAndPaste.ts";
1414
import { useMarkdownGrammer } from "./hooks/useMarkdownGrammer";
1515
import { useTextOptionSelect } from "./hooks/useTextOptions.ts";
16-
import { DndContextProvider } from "./provider/DndContextProvider.tsx";
17-
import { WebsocketContextProvider } from "./provider/WebsocketContextProvider.tsx";
16+
import { DndProvider } from "./provider/DndProvider.tsx";
17+
import { WebSocketProvider } from "./provider/WebsocketProvider.tsx";
1818

1919
export interface EditorStateProps {
2020
clock: number;
@@ -193,21 +193,21 @@ export const Editor = memo(({ testKey, pageId, serializedEditorData }: EditorPro
193193
return <div>Loading editor data...</div>;
194194
}
195195
return (
196-
<WebsocketContextProvider
197-
editorCRDT={editorCRDT}
198-
pageId={pageId}
199-
setEditorState={setEditorState}
200-
isSameLocalChange={isSameLocalChange}
201-
subscribeToRemoteOperations={subscribeToRemoteOperations}
202-
>
203-
<div data-testid={`editor-${testKey}`} className={editorContainer} ref={editorRef}>
204-
<div
205-
style={{
206-
height: virtualizer.getTotalSize(),
207-
position: "relative",
208-
}}
196+
<div data-testid={`editor-${testKey}`} className={editorContainer} ref={editorRef}>
197+
<div
198+
style={{
199+
height: virtualizer.getTotalSize(),
200+
position: "relative",
201+
}}
202+
>
203+
<WebSocketProvider
204+
editorCRDT={editorCRDT}
205+
pageId={pageId}
206+
setEditorState={setEditorState}
207+
isSameLocalChange={isSameLocalChange}
208+
subscribeToRemoteOperations={subscribeToRemoteOperations}
209209
>
210-
<DndContextProvider
210+
<DndProvider
211211
editorCRDT={editorCRDT}
212212
pageId={pageId}
213213
editorState={editorState}
@@ -248,7 +248,7 @@ export const Editor = memo(({ testKey, pageId, serializedEditorData }: EditorPro
248248
/>
249249
);
250250
})}
251-
</DndContextProvider>
251+
</DndProvider>
252252
{editorState.linkedList.spread().length === 0 && (
253253
<div
254254
data-testid="addNewBlockButton"
@@ -258,9 +258,9 @@ export const Editor = memo(({ testKey, pageId, serializedEditorData }: EditorPro
258258
클릭해서 새로운 블록을 추가하세요
259259
</div>
260260
)}
261-
</div>
261+
</WebSocketProvider>
262262
</div>
263-
</WebsocketContextProvider>
263+
</div>
264264
);
265265
});
266266

client/src/features/editor/provider/DndContextProvider.tsx renamed to client/src/features/editor/provider/DndProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { EditorStateProps } from "../Editor";
55

66
import { useBlockDragAndDrop } from "../hooks/useBlockDragAndDrop";
77

8-
export interface DndContextProviderProps {
8+
export interface DndProviderProps {
99
children: React.ReactNode;
1010
editorCRDT: React.MutableRefObject<EditorCRDT>;
1111
pageId: string;
@@ -16,7 +16,7 @@ export interface DndContextProviderProps {
1616
setDragBlockList: React.Dispatch<React.SetStateAction<string[]>>;
1717
}
1818

19-
export const DndContextProvider = ({
19+
export const DndProvider = ({
2020
children,
2121
editorCRDT,
2222
pageId,
@@ -25,7 +25,7 @@ export const DndContextProvider = ({
2525
isLocalChange,
2626
dragBlockList,
2727
setDragBlockList,
28-
}: DndContextProviderProps) => {
28+
}: DndProviderProps) => {
2929
const { sensors, handleDragEnd, handleDragStart } = useBlockDragAndDrop({
3030
editorCRDT: editorCRDT.current,
3131
editorState,

client/src/features/editor/provider/WebsocketContextProvider.tsx renamed to client/src/features/editor/provider/WebsocketProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useRef, MutableRefObject, useEffect } from "react";
33
import { RemoteOperationHandlers } from "@src/stores/useSocketStore.ts";
44
import { useEditorOperation } from "../hooks/useEditorOperation";
55

6-
export interface WebsocketContextProviderProps {
6+
export interface WebSocketProviderProps {
77
children: React.ReactNode;
88
editorCRDT: MutableRefObject<EditorCRDT>;
99
pageId: string;
@@ -12,14 +12,14 @@ export interface WebsocketContextProviderProps {
1212
subscribeToRemoteOperations: (handlers: RemoteOperationHandlers) => (() => void) | undefined;
1313
}
1414

15-
export const WebsocketContextProvider = ({
15+
export const WebSocketProvider = ({
1616
children,
1717
editorCRDT,
1818
pageId,
1919
setEditorState,
2020
isSameLocalChange,
2121
subscribeToRemoteOperations,
22-
}: WebsocketContextProviderProps) => {
22+
}: WebSocketProviderProps) => {
2323
const subscriptionRef = useRef(false);
2424

2525
const {

0 commit comments

Comments
 (0)