Files
klz-cables.com/.pnpm-store/v10/files/32/7591e9dce3f84672c2e56ce915660660d82a8fc3945cad2604f0f6084a18d6139758c872ecb4c015d7927c3ff9f135f8fed0c8f4ba85e0954c9f7f1be05e85
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

44 lines
1.2 KiB
Plaintext

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import * as React from 'react';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
*
* Use this plugin to access the editor instance outside of the
* LexicalComposer. This can help with things like buttons or other
* UI components that need to update or read EditorState but need to
* be positioned outside the LexicalComposer in the React tree.
*/
function EditorRefPlugin({
editorRef
}) {
const [editor] = useLexicalComposerContext();
React.useEffect(() => {
if (typeof editorRef === 'function') {
editorRef(editor);
} else if (typeof editorRef === 'object') {
editorRef.current = editor;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [editor]);
return null;
}
export { EditorRefPlugin };