Files
klz-cables.com/.pnpm-store/v10/files/27/f5dc01b3bd48bc8398523cd62cb1d5c2d0c4c60c0477d2b0286e1d0769a8a6e53ef0144ab0f0135329ca3d31053af7c107ba2f6288ce397af36c23f7dbc814
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

52 lines
1.3 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 { createContext, useContext } 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.
*
*/
// Do not require this module directly! Use normal `invariant` calls.
function formatDevErrorMessage(message) {
throw new Error(message);
}
const LexicalComposerContext = /*#__PURE__*/createContext(null);
function createLexicalComposerContext(parent, theme) {
let parentContext = null;
if (parent != null) {
parentContext = parent[1];
}
function getTheme() {
if (theme != null) {
return theme;
}
return parentContext != null ? parentContext.getTheme() : null;
}
return {
getTheme
};
}
function useLexicalComposerContext() {
const composerContext = useContext(LexicalComposerContext);
if (composerContext == null) {
{
formatDevErrorMessage(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);
}
}
return composerContext;
}
export { LexicalComposerContext, createLexicalComposerContext, useLexicalComposerContext };