feat: add mobile ui to calendar

This commit is contained in:
Simon Emanuelsson
2024-09-27 17:44:36 +02:00
parent 73eddcf4b7
commit 1380dec6e3
32 changed files with 1005 additions and 296 deletions

10
utils/debounce.ts Normal file
View File

@@ -0,0 +1,10 @@
export function debounce(func: Function, delay = 300) {
let debounceTimer: ReturnType<typeof setTimeout>
return function () {
// @ts-expect-error this in TypeScript
const context = this
const args = arguments
clearTimeout(debounceTimer)
debounceTimer = setTimeout(() => func.apply(context, args), delay)
}
}