update imageSrc with userId, shorter debounce times

This commit is contained in:
martin-mfg
2025-10-22 15:56:12 +02:00
parent 03e5096e78
commit 4ac70d3fa7
3 changed files with 6 additions and 2 deletions
@@ -29,7 +29,7 @@ const NumericSection = ({
}
debounceTimeout.current = setTimeout(() => {
setValue(internalValue);
}, 1000);
}, 700);
return () => clearTimeout(debounceTimeout.current);
}, [internalValue]);
@@ -26,7 +26,7 @@ const TextSection = ({
}
debounceTimeout.current = setTimeout(() => {
setValue(internalValue);
}, 1500);
}, 700);
// return cleanup function:
return () => clearTimeout(debounceTimeout.current);
}, [internalValue]);
+4
View File
@@ -67,6 +67,10 @@ const HomeScreen = () => {
resetCustomization();
}, [selectedCard]);
useEffect(() => {
setImageSrc(`?&username=${userId}`);
}, [userId]);
const time = selectedTimeRange.value;
let fullSuffix = `${imageSrc}&time_range=${time}`;