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

48 lines
1.8 KiB
Plaintext

import type { ClientCollectionConfig, ClientConfig, ClientGlobalConfig, CollectionSlug, GlobalSlug } from 'payload';
import React from 'react';
type GetEntityConfigFn = {
(args: {
collectionSlug: {} | CollectionSlug;
globalSlug?: never;
}): ClientCollectionConfig;
(args: {
collectionSlug?: never;
globalSlug: {} | GlobalSlug;
}): ClientGlobalConfig;
(args: {
collectionSlug?: {} | CollectionSlug;
globalSlug?: {} | GlobalSlug;
}): ClientCollectionConfig | ClientGlobalConfig | null;
};
export type ClientConfigContext = {
config: ClientConfig;
/**
* Get a collection or global config by its slug. This is preferred over
* using `config.collections.find` or `config.globals.find`, because
* getEntityConfig uses a lookup map for O(1) lookups.
*/
getEntityConfig: GetEntityConfigFn;
setConfig: (config: ClientConfig) => void;
};
export declare const ConfigProvider: React.FC<{
readonly children: React.ReactNode;
readonly config: ClientConfig;
}>;
export declare const useConfig: () => ClientConfigContext;
/**
* This provider shadows the `ConfigProvider` on the _page_ level, allowing us to
* update the config when needed, e.g. after authentication.
* The layout `ConfigProvider` is not updated on page navigation / authentication,
* as the layout does not re-render in those cases.
*
* If the config here has the same reference as the config from the layout, we
* simply reuse the context from the layout to avoid unnecessary re-renders.
*
* @experimental This component is experimental and may change or be removed in future releases. Use at your own risk.
*/
export declare const PageConfigProvider: React.FC<{
readonly children: React.ReactNode;
readonly config: ClientConfig;
}>;
export {};
//# sourceMappingURL=index.d.ts.map