mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-02 04:46:18 -05:00
RaspberrypiOS now matches location of serve on Debian 12.
This commit is contained in:
parent
00579759cc
commit
a491ea7677
6 changed files with 6 additions and 21 deletions
|
|
@ -67,9 +67,11 @@ export const useLatestRequest = (delay = 300) => {
|
|||
// A hook which ignores older requests and will only set `data` to the latest response's data.
|
||||
// usage: sendRequest(async () => await yourAPICall(...args));
|
||||
|
||||
// The results from awaiting `fetchFunction`.
|
||||
const [data, setData] = React.useState(null);
|
||||
const latestRequestRef = React.useRef(0);
|
||||
const debounceTimerRef = React.useRef(null);
|
||||
// Loading while awaiting.
|
||||
const [loading, setLoading] = React.useState(false);
|
||||
|
||||
const sendRequest = React.useCallback((fetchFunction) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue