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

35 lines
1.3 KiB
Plaintext

import { useFormatter as useFormatter$1, useTranslations as useTranslations$1 } from 'use-intl';
/**
* This is the main entry file when non-'react-server'
* environments import from 'next-intl'.
*
* Maintainer notes:
* - Make sure this mirrors the API from 'react-server'.
* - Make sure everything exported from this module is
* supported in all Next.js versions that are supported.
*/
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
function callHook(name, hook) {
return (...args) => {
try {
return hook(...args);
} catch {
throw new Error(`Failed to call \`${name}\` because the context from \`NextIntlClientProvider\` was not found.
This can happen because:
1) You intended to render this component as a Server Component, the render
failed, and therefore React attempted to render the component on the client
instead. If this is the case, check the console for server errors.
2) You intended to render this component on the client side, but no context was found.
Learn more about this error here: https://next-intl.dev/docs/environments/server-client-components#missing-context` );
}
};
}
const useTranslations = callHook('useTranslations', useTranslations$1);
const useFormatter = callHook('useFormatter', useFormatter$1);
export { useFormatter, useTranslations };