Skip to content

Commit e269f2c

Browse files
Adjust dynamic title index condition
1 parent f9c83d3 commit e269f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/Hero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Hero({
1515
}) {
1616
const [titleIndex, setTitleIndex] = useState(0);
1717
const handleTitleIndex = () =>
18-
setTitleIndex(titleIndex === dynamicTitles.length - 1 ? 0 : titleIndex + 1);
18+
setTitleIndex(titleIndex >= dynamicTitles.length - 1 ? 0 : titleIndex + 1);
1919

2020
useEffect(() => {
2121
setTimeout(handleTitleIndex, 1350);

0 commit comments

Comments
 (0)