fix: a lot of minor improvements for dashboard

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-07 12:28:54 +01:00
parent 5b1c582023
commit c762bd7c95
19 changed files with 591 additions and 388 deletions

View File

@@ -117,7 +117,14 @@ export function ActionCTAButton() {
useEffect(() => {
const interval = setInterval(() => {
setCurrentActionIndex((prevIndex) => (prevIndex + 1) % ACTIONS.length);
setCurrentActionIndex((prevIndex) => {
const nextIndex = (prevIndex + 1) % ACTIONS.length;
if (nextIndex === 0 && prevIndex !== 0) {
clearInterval(interval);
return 0;
}
return nextIndex;
});
}, 2000);
return () => clearInterval(interval);