update imageSrc with userId, shorter debounce times
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -67,6 +67,10 @@ const HomeScreen = () => {
|
||||
resetCustomization();
|
||||
}, [selectedCard]);
|
||||
|
||||
useEffect(() => {
|
||||
setImageSrc(`?&username=${userId}`);
|
||||
}, [userId]);
|
||||
|
||||
const time = selectedTimeRange.value;
|
||||
let fullSuffix = `${imageSrc}&time_range=${time}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user