help me fix this code for custom ckeditor
"use client";
import React, { useRef } from "react";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
export const CKEditorField: React.FC = ({ path, label }) => {
const { value, setValue } = useField<string>({ path });
const editorRef = useRef<any>();
return (
<div className="field-type">
{label && <label className="field-label">{label}</label>}
<CKEditor
editor={ClassicEditor}
data={value || ""}
onReady={(editor) => {
editorRef.current = editor;
}}
onChange={(_, editor) => {
const data = editor.getData();
setValue(data);
}}
/>
</div>
);
};