Files
klz-cables.com/.pnpm-store/v10/files/96/506ab941c59c243cf95073735483a6855b7ecd146ca4e994f7a9b6aa11098660fe3ac08834e191d7fc2690a30ee06f98d4ea4a3e20f7223d30e6521d2f51ba
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

20 lines
629 B
Plaintext

import { cache } from 'react';
import getConfig from './getConfig.js';
function getMessagesFromConfig(config) {
if (!config.messages) {
throw new Error('No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages');
}
return config.messages;
}
async function getMessagesCachedImpl(locale) {
const config = await getConfig(locale);
return getMessagesFromConfig(config);
}
const getMessagesCached = cache(getMessagesCachedImpl);
async function getMessages(opts) {
return getMessagesCached(opts?.locale);
}
export { getMessages as default, getMessagesFromConfig };