Rocky_Mountain_Vending/.pnpm-store/v10/files/75/fbd0fe8486b3fe540a0c04eef40fe6c77f301b4b0b214592b437039f8e96852315ab229ac19be414db766540fb4c0a2ed20470da0700a75d49510a655dcf46
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

22 lines
496 B
Text

function safeRequestAnimationFrame(callback) {
if (typeof requestAnimationFrame !== 'undefined') requestAnimationFrame(callback);
}
export default function setRafTimeout(callback, timeout = 0) {
let currTime = -1;
const shouldUpdate = now => {
if (currTime < 0) {
currTime = now;
}
if (now - currTime > timeout) {
callback(now);
currTime = -1;
} else {
safeRequestAnimationFrame(shouldUpdate);
}
};
requestAnimationFrame(shouldUpdate);
}