All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: #2716 Reviewed-by: konrad <k@knt.li> Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
9 lines
233 B
TypeScript
9 lines
233 B
TypeScript
const LOADING_TIMEOUT = 100
|
|
|
|
export function setModuleLoading(loadFunc: (isLoading: boolean) => void) {
|
|
const timeout = setTimeout(() => loadFunc(true), LOADING_TIMEOUT)
|
|
return () => {
|
|
clearTimeout(timeout)
|
|
loadFunc(false)
|
|
}
|
|
} |