Files
klz-cables.com/.pnpm-store/v10/files/2a/75306b815b5d1a21e84dbbe3242ec8aad62988c8b097f6ca27429db497482ea251b8ededa5d7e3509186ecc9959d369709a6b44c40a9353f011f60fc6a237c
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

34 lines
926 B
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { useState } from 'react';
import { useConfig } from '../providers/Config/index.js';
/**
* Gets the corresponding client collection config(s) for the given collection slug.
*/
export const useRelatedCollections = relationTo => {
const $ = _c(3);
const {
getEntityConfig
} = useConfig();
let t0;
if ($[0] !== getEntityConfig || $[1] !== relationTo) {
t0 = () => {
if (relationTo) {
const relations = typeof relationTo === "string" ? [relationTo] : relationTo;
return relations.map(relation => getEntityConfig({
collectionSlug: relation
}));
}
return [];
};
$[0] = getEntityConfig;
$[1] = relationTo;
$[2] = t0;
} else {
t0 = $[2];
}
const [relatedCollections] = useState(t0);
return relatedCollections;
};
//# sourceMappingURL=useRelatedCollections.js.map