Keep the verse of the day when IQ Bible is down
Build and Push Docker Image / build-and-push (push) Successful in 5m42s
Build and Push Docker Image / build-and-push (push) Successful in 5m42s
- Fall back to a built-in verse (one a day, same for everyone) in the reader's own translation - No translation picker in fallback mode; card shows even with no IQ Bible key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
512c6b6889
commit
edc5a65d2b
4 files changed
+78
-13
No files matched your search
+6
-1
@@ -3,7 +3,12 @@ import { iqAvailable, iqGet } from '../utils/iqbible.js';
|
||||
|
||||
// Whether the server has an IQ Bible key. false until known, so IQ-only UI never flashes up.
|
||||
export function useIqAvailable() {
|
||||
const [on, setOn] = useState(false);
|
||||
return useIqStatus() === true;
|
||||
}
|
||||
|
||||
// Same, but null until the server has answered.
|
||||
export function useIqStatus() {
|
||||
const [on, setOn] = useState(null);
|
||||
useEffect(() => {
|
||||
let live = true;
|
||||
iqAvailable().then((v) => { if (live) setOn(v); });
|
||||
|
||||
Reference in new issue
Block a user