Files
klz-cables.com/.pnpm-store/v10/files/69/32d9e814cdde58a5180e05b53b1cc520ded8ebbfb1bb6d6305c833594462a83eb06040bf74c3dc5c758868932cbcd9baeb09e170b57f02d9d9663452fc6324
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
539 B
Plaintext

import { useEffect } from 'react';
import { useClickOutsideContext } from '../providers/ClickOutside/index.js';
export function useClickOutside(ref, handler, enabled = true) {
const {
register,
unregister
} = useClickOutsideContext();
useEffect(() => {
if (!enabled || !ref.current) {
return;
}
const listener = {
handler,
ref
};
register(listener);
return () => unregister(listener);
}, [ref, handler, enabled, register, unregister]);
}
//# sourceMappingURL=useClickOutside.js.map