Files
klz-cables.com/.pnpm-store/v10/files/a7/1999cf6ab65f7359cdb9d21dc70cfceffc4b525ec0e61167af8a6ccb3ee7773a5c925b10f0cfd5482b86093c9ea1b7b51a1aaff50cadd2704cab43104bfa29
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

31 lines
698 B
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { useEffect, useState } from 'react';
export function useDebounce(value, delay) {
const $ = _c(4);
const [debouncedValue, setDebouncedValue] = useState(value);
let t0;
let t1;
if ($[0] !== delay || $[1] !== value) {
t0 = () => {
const handler = setTimeout(() => {
setDebouncedValue(value);
}, delay);
return () => {
clearTimeout(handler);
};
};
t1 = [value, delay];
$[0] = delay;
$[1] = value;
$[2] = t0;
$[3] = t1;
} else {
t0 = $[2];
t1 = $[3];
}
useEffect(t0, t1);
return debouncedValue;
}
//# sourceMappingURL=useDebounce.js.map