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}
setExportStartTime={setExportStartTime}
setExportEndTime={setExportEndTime}
timelineCollapsed={motionOnly}
dense={dense}
>
{segments}

View File

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

View File

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