Files
klz-cables.com/.pnpm-store/v10/files/b9/5a2adef58c8535ac0c715346d34274a5d405b1f15c803ddca53bc88de45422dd97277ffd36081d8bdb1f1ec9b974edcdd7c270cb70f342d930e31eaa5265f5
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

22 lines
670 B
Plaintext

import getConfig from '../server/react-server/getConfig.js';
import use from '../shared/use.js';
function useHook(hookName, promise) {
try {
return use(promise);
} catch (error) {
if (error instanceof TypeError && error.message.includes("Cannot read properties of null (reading 'use')")) {
throw new Error(`\`${hookName}\` is not callable within an async component. Please refer to https://next-intl.dev/docs/environments/server-client-components#async-components`, {
cause: error
});
} else {
throw error;
}
}
}
function useConfig(hookName) {
return useHook(hookName, getConfig());
}
export { useConfig as default };