aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/other/ReplayPage.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js
index 1fddc21c..9bdf87be 100644
--- a/modern/src/other/ReplayPage.js
+++ b/modern/src/other/ReplayPage.js
@@ -115,8 +115,9 @@ const ReplayPage = () => {
}, [playing, positions]);
useEffect(() => {
- if (index >= positions.length) {
+ if (index >= positions.length - 1) {
clearInterval(timerRef.current);
+ setPlaying(false);
}
}, [index, positions]);
@@ -171,7 +172,7 @@ const ReplayPage = () => {
ValueLabelComponent={TimeLabel}
/>
<div className={classes.controls}>
- {`${index}/${positions.length}`}
+ {`${index + 1}/${positions.length}`}
<IconButton onClick={() => setIndex((index) => index - 1)} disabled={playing}>
<FastRewindIcon />
</IconButton>