Files
klz-cables.com/.pnpm-store/v10/files/0f/55acac307dce7d8147801d06c862755627013ba27a39fd675231cfeb29c86ca2290f7a44af5482a94bb77479f6acd313ae336b32bb7476834532235ddedd09
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

33 lines
1.2 KiB
Plaintext

/**
* Allows to import `next-intl/server` in non-RSC environments.
*
* This is mostly relevant for testing, since e.g. a `generateMetadata`
* export from a page might use `next-intl/server`, but the test
* only uses the default export for a page.
*/
function notSupported(message) {
return () => {
throw new Error(`\`${message}\` is not supported in Client Components.`);
};
}
function getRequestConfig(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
...args) {
return notSupported('getRequestConfig');
}
const getFormatter = notSupported('getFormatter');
const getNow = notSupported('getNow');
const getTimeZone = notSupported('getTimeZone');
const getMessages = notSupported('getMessages');
const getLocale = notSupported('getLocale');
const getExtracted = notSupported('getExtracted');
// The type of `getTranslations` is not assigned here because it
// causes a type error. The types use the `react-server` entry
// anyway, therefore this is irrelevant.
const getTranslations = notSupported('getTranslations');
const setRequestLocale = notSupported('setRequestLocale');
export { getExtracted, getFormatter, getLocale, getMessages, getNow, getRequestConfig, getTimeZone, getTranslations, setRequestLocale };