Skip to content

Commit a0afe15

Browse files
chore(shadcn): clean up (#1274)
1 parent 6ee1daf commit a0afe15

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

packages/shadcn/components/agents-ui/agent-control-bar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useEffect, useRef, useState, type ComponentProps } from 'react';
44
import { useChat } from '@livekit/components-react';
55
import { Track } from 'livekit-client';
66
import { Loader, MessageSquareTextIcon, SendHorizontal } from 'lucide-react';
7-
import { motion } from 'motion/react';
7+
import { motion, type MotionProps } from 'motion/react';
88

99
import { cn } from '@/lib/utils';
1010
import { AgentDisconnectButton } from '@/components/agents-ui/agent-disconnect-button';
@@ -42,7 +42,7 @@ const LK_TOGGLE_VARIANT_2 = [
4242
'dark:data-[state=on]:bg-blue-500/20 dark:data-[state=on]:text-blue-300',
4343
];
4444

45-
const MOTION_PROPS = {
45+
const MOTION_PROPS: MotionProps = {
4646
variants: {
4747
hidden: {
4848
height: 0,

packages/shadcn/components/agents-ui/react-shader-toy.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,10 @@ export function ReactShaderToy({
839839
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
840840
const mouseValue = uniformsRef.current.iMouse?.value;
841841
if (uniformsRef.current.iMouse?.isNeeded && lerp !== 1 && Array.isArray(mouseValue)) {
842-
mouseValue[0] = lerpVal(mouseValue[0], lastMouseArrRef.current[0] ?? 0, lerp);
843-
mouseValue[1] = lerpVal(mouseValue[1], lastMouseArrRef.current[1] ?? 0, lerp);
842+
const currentX = mouseValue[0] ?? 0;
843+
const currentY = mouseValue[1] ?? 0;
844+
mouseValue[0] = lerpVal(currentX, lastMouseArrRef.current[0] ?? 0, lerp);
845+
mouseValue[1] = lerpVal(currentY, lastMouseArrRef.current[1] ?? 0, lerp);
844846
}
845847
animFrameIdRef.current = requestAnimationFrame(drawScene);
846848
};

0 commit comments

Comments
 (0)