Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Mar 19, 2024
1 parent 4e668f0 commit aece414
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/components/player/PreviewThumbnailPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type PreviewPlayerProps = {
review: ReviewSegment;
allPreviews?: Preview[];
scrollLock?: boolean;
onTimeUpdate?: React.Dispatch<React.SetStateAction<number | undefined>>;
onTimeUpdate?: (time: number | undefined) => void;
setReviewed: (review: ReviewSegment) => void;
onClick: (reviewId: string, ctrl: boolean) => void;
};
Expand Down
7 changes: 6 additions & 1 deletion web/src/views/events/EventView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,12 @@ function DetectionReview({
const [previewTime, setPreviewTime] = useState<number>();

const onPreviewTimeUpdate = useCallback(
(time: number) => {
(time: number | undefined) => {
if (!time) {
setPreviewTime(time);
return;
}

if (!previewTime || time > previewTime) {
setPreviewTime(time);
}
Expand Down

0 comments on commit aece414

Please sign in to comment.