Add a switch to toggle between the new and old grids

This commit is contained in:
Robin Townsend
2023-02-13 20:36:42 -05:00
parent b2b2f0bb15
commit 69e6ba93c1
6 changed files with 34 additions and 15 deletions

View File

@@ -52,7 +52,7 @@ interface Props {
y: SpringValue<number>;
width: SpringValue<number>;
height: SpringValue<number>;
onDragRef: RefObject<
onDragRef?: RefObject<
(
tileId: string,
state: Parameters<Handler<"drag", EventTypes["drag"]>>[0]
@@ -100,7 +100,7 @@ export const VideoTileContainer: FC<Props> = memo(
isLocal || maximised
);
useDrag((state) => onDragRef.current!(item.id, state), {
useDrag((state) => onDragRef?.current!(item.id, state), {
target: tileRef,
filterTaps: true,
preventScroll: true,