Skip to content

Commit

Permalink
Merge pull request #91 from CS3219-AY2324S1/staging
Browse files Browse the repository at this point in the history
fix: unused props in codeeditor
  • Loading branch information
zechajw authored Nov 14, 2023
2 parents 24302da + 54f7e06 commit 0587bf7
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface CodeEditorProps {
className?: string;
roomId: string;
language: LanguageSupport;
setCurrentDocState: Dispatch<SetStateAction<string>>;
}

export const CodeEditor = ({
Expand All @@ -22,7 +21,6 @@ export const CodeEditor = ({
socket,
roomId,
language,
setCurrentDocState,
}: CodeEditorProps) => {
const [version, setVersion] = useState<number | null>(null);
const [isLoading, setLoading] = useState(true);
Expand Down Expand Up @@ -53,7 +51,7 @@ export const CodeEditor = ({
socket?.off("pushUpdateResponse");
socket?.off("getDocumentResponse");
};
}, [socket, roomId]);
}, [socket, roomId, setDoc]);

if (isLoading || !socket) {
return <Spinner />;
Expand All @@ -77,7 +75,6 @@ export const CodeEditor = ({
peerExtension(socket, version, roomId),
EditorView.lineWrapping,
]}
onChange={value => setCurrentDocState(value)}
value={doc}
/>
);
Expand Down

0 comments on commit 0587bf7

Please sign in to comment.