mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
Fix: prevent auto-switch tab on refresh
This commit is contained in:
@@ -48,9 +48,7 @@ export const SegmentListComponent = (props: SegmentListComponentProps) => {
|
||||
|
||||
React.useEffect(() => {
|
||||
const hasSegments = props.segments.find(seg => seg.actionType !== ActionType.Chapter)
|
||||
if (hasSegments) {
|
||||
setTab(SegmentListTab.Segments);
|
||||
} else {
|
||||
if (!hasSegments && props.segments.length > 0) {
|
||||
setTab(SegmentListTab.Chapter);
|
||||
}
|
||||
}, [props.videoID, props.segments]);
|
||||
|
||||
Reference in New Issue
Block a user