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

1 line
1.3 KiB
Plaintext

{"version":3,"file":"useThrottledValue.js","names":["useEffect","useState","useThrottledValue","value","delay","throttledValue","setThrottledValue","handler","setTimeout","clearTimeout"],"sources":["../../src/hooks/useThrottledValue.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\n/**\n * A custom React hook to throttle a value so that it updates no more than once every `delay` milliseconds.\n * @param {any} value - The value to be throttled.\n * @param {number} delay - The minimum delay (in milliseconds) between updates.\n * @returns {any} - The throttled value.\n */\nexport function useThrottledValue(value, delay) {\n const [throttledValue, setThrottledValue] = useState(value)\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setThrottledValue(value)\n }, delay)\n\n // Cleanup the timeout if the value changes before the delay is completed\n return () => {\n clearTimeout(handler)\n }\n }, [value, delay])\n\n return throttledValue\n}\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ;AAEpC;;;;;;AAMA,OAAO,SAASC,kBAAkBC,KAAK,EAAEC,KAAK;EAC5C,MAAM,CAACC,cAAA,EAAgBC,iBAAA,CAAkB,GAAGL,QAAA,CAASE,KAAA;EAErDH,SAAA,CAAU;IACR,MAAMO,OAAA,GAAUC,UAAA,CAAW;MACzBF,iBAAA,CAAkBH,KAAA;IACpB,GAAGC,KAAA;IAEH;IACA,OAAO;MACLK,YAAA,CAAaF,OAAA;IACf;EACF,GAAG,CAACJ,KAAA,EAAOC,KAAA,CAAM;EAEjB,OAAOC,cAAA;AACT","ignoreList":[]}