Skip to content

Commit

Permalink
chore: rm console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Jun 26, 2024
1 parent ff0b015 commit 9b43191
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/react/src/EditorContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const mergeRefs = <T extends HTMLDivElement>(
const Portals: React.FC<{ contentComponent: Exclude<Editor['contentComponent'], null> }> = ({ contentComponent }) => {
const renderers = useSyncExternalStore(contentComponent.subscribe, contentComponent.getSnapshot, contentComponent.getServerSnapshot)

console.log(renderers)
return (
<>
{Object.entries(renderers).map(([key, renderer]) => {
Expand All @@ -50,27 +49,22 @@ function getInstance(): Exclude<Editor['contentComponent'], null> {
*/
subscribe(callback: () => void) {
subscribers.add(callback)
console.log('subscribers', subscribers.size)
return () => {
console.log('unsubscribing')
subscribers.delete(callback)
}
},
getSnapshot() {
console.log('getSnapshot', renderers)
return renderers
},
getServerSnapshot() {
// TODO figure out if this is valid
return renderers
},
setRenderer(id: string, renderer: ReactRenderer) {
console.log('setRenderer', id, renderer)
renderers = {
...renderers,
[id]: renderer,
}
console.log('renderers', renderers)

subscribers.forEach(subscriber => subscriber())
},
Expand Down Expand Up @@ -187,7 +181,6 @@ export class PureEditorContent extends React.Component<EditorContentProps, {hasC
render() {
const { editor, innerRef, ...rest } = this.props

console.log('contentComponent', editor?.contentComponent)
return (
<>
<div ref={mergeRefs(innerRef, this.editorContentRef)} {...rest} />
Expand Down

0 comments on commit 9b43191

Please sign in to comment.