fix(app): latch startup store readiness

This commit is contained in:
Mohamed Boudra
2026-05-03 20:15:19 +07:00
parent 6d13796b2d
commit ade05607d2
3 changed files with 38 additions and 1 deletions
@@ -0,0 +1,13 @@
import { useEffect, useState } from "react";
export function useLatchedBoolean(value: boolean): boolean {
const [hasLatched, setHasLatched] = useState(value);
useEffect(() => {
if (value) {
setHasLatched(true);
}
}, [value]);
return hasLatched || value;
}