This commit is contained in:
felistachio
2025-09-20 17:27:46 -07:00
parent 7ccdf67195
commit 9e501a5f66

View File

@@ -47,11 +47,11 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
}, []);
React.useEffect(() => {
const hasNonChapter = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
if (!hasNonChapter && props.segments.length > 0) {
setTab(SegmentListTab.Chapter);
} else {
const hasSegments = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
if (hasSegments) {
setTab(SegmentListTab.Segments);
} else {
setTab(SegmentListTab.Chapter);
}
}, [props.videoID, props.segments]);