fix missing collapsed prop after refactor (#10751)

This commit is contained in:
Josh Hawkins 2024-03-30 10:51:03 -05:00 committed by GitHub
parent 37394fbe19
commit 7d3b481181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -185,6 +185,7 @@ export function MotionReviewTimeline({
exportEndTime={exportEndTime} exportEndTime={exportEndTime}
setExportStartTime={setExportStartTime} setExportStartTime={setExportStartTime}
setExportEndTime={setExportEndTime} setExportEndTime={setExportEndTime}
timelineCollapsed={motionOnly}
dense={dense} dense={dense}
> >
{segments} {segments}

View File

@ -28,6 +28,7 @@ export type ReviewTimelineProps = {
exportEndTime?: number; exportEndTime?: number;
setExportStartTime?: React.Dispatch<React.SetStateAction<number>>; setExportStartTime?: React.Dispatch<React.SetStateAction<number>>;
setExportEndTime?: React.Dispatch<React.SetStateAction<number>>; setExportEndTime?: React.Dispatch<React.SetStateAction<number>>;
timelineCollapsed?: boolean;
dense: boolean; dense: boolean;
children: ReactNode; children: ReactNode;
}; };
@ -48,6 +49,7 @@ export function ReviewTimeline({
setExportStartTime, setExportStartTime,
exportEndTime, exportEndTime,
setExportEndTime, setExportEndTime,
timelineCollapsed = false,
dense, dense,
children, children,
}: ReviewTimelineProps) { }: ReviewTimelineProps) {
@ -105,6 +107,7 @@ export function ReviewTimeline({
setDraggableElementTime: setHandlebarTime, setDraggableElementTime: setHandlebarTime,
initialScrollIntoViewOnly: onlyInitialHandlebarScroll, initialScrollIntoViewOnly: onlyInitialHandlebarScroll,
timelineDuration, timelineDuration,
timelineCollapsed: timelineCollapsed,
timelineStartAligned, timelineStartAligned,
isDragging: isDraggingHandlebar, isDragging: isDraggingHandlebar,
setIsDragging: setIsDraggingHandlebar, setIsDragging: setIsDraggingHandlebar,

View File

@ -82,7 +82,7 @@ export function useCameraMotionNextTimestamp(
}); });
const noMotionRanges = useMemo(() => { const noMotionRanges = useMemo(() => {
if (!motionData || !reviewItems || !motionData) { if (!motionData?.length || !reviewItems) {
return; return;
} }