use Fragment instead of div

This commit is contained in:
Simon 2024-12-23 16:46:58 +07:00
parent c53a706a8e
commit 1393d6886e
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import updateWatchedState from '../api/actions/updateWatchedState';
import { SponsorBlockSegmentType, SponsorBlockType, VideoResponseType } from '../pages/Video';
import watchedThreshold from '../functions/watchedThreshold';
import Notifications from './Notifications';
import { Dispatch, SetStateAction, SyntheticEvent, useState } from 'react';
import { Dispatch, Fragment, SetStateAction, SyntheticEvent, useState } from 'react';
import formatTime from '../functions/formatTime';
import { useSearchParams } from 'react-router-dom';
import getApiUrl from '../configuration/getApiUrl';
@ -249,13 +249,13 @@ const VideoPlayer = ({
{Object.values(skippedSegments).map(({ from, to }, index) => {
return (
<div key={`${from}-${to}-${index}`}>
<Fragment key={`${from}-${to}-${index}`}>
{from !== 0 && to !== 0 && (
<h3>
Skipped sponsor segment from {formatTime(from)} to {formatTime(to)}.
</h3>
)}
</div>
</Fragment>
);
})}
</>