diff --git a/src/components/section/Card.tsx b/src/components/section/Card.tsx index 1838bfb..67da73d 100644 --- a/src/components/section/Card.tsx +++ b/src/components/section/Card.tsx @@ -17,7 +17,7 @@ export interface ItemsProps extends React.HTMLAttributes { */ isDragged?: boolean isOverlay?: boolean - listeners?: SyntheticListenerMap + handleListeners?: SyntheticListenerMap } interface NewsCardProps { @@ -31,7 +31,7 @@ interface Query { query: UseQueryResult } -export const CardWrapper = forwardRef(({ id, isDragged, isOverlay, listeners, style, ...props }, dndRef) => { +export const CardWrapper = forwardRef(({ id, isDragged, isOverlay, handleListeners, style, ...props }, dndRef) => { const ref = useRef(null) const { ref: inViewRef, inView } = useInView({ threshold: 0, @@ -48,14 +48,13 @@ export const CardWrapper = forwardRef(({ id, isDragg isDragged && "op-50", isOverlay ? "bg-glass" : "", )} - key={id} style={{ transformOrigin: "50% 50%", ...style, }} {...props} > - + ) }) diff --git a/src/components/section/Dnd.tsx b/src/components/section/Dnd.tsx index 4c4f649..7e37a87 100644 --- a/src/components/section/Dnd.tsx +++ b/src/components/section/Dnd.tsx @@ -66,8 +66,7 @@ export function Dnd() { ) } -function SortableCardWrapper(props: ItemsProps) { - const { id } = props +function SortableCardWrapper({ id, ...props }: ItemsProps) { const { isDragging, attributes, @@ -79,15 +78,16 @@ function SortableCardWrapper(props: ItemsProps) { const style = { transform: CSS.Transform.toString(transform), - transition: transition || undefined, + transition, } return (