Skip to content

Commit 66fed26

Browse files
authored
fix select agent animation (#72)
Before: https://github.com/user-attachments/assets/2fdde12b-094b-4987-9e00-9cda1e2a89a2 After: https://github.com/user-attachments/assets/a5b1f6dc-a7f9-45ec-9c10-de2c8942f1ca Notice how when I unselect an agent, the prompt input bar doesn't jump. I have no idea why getting rid of the animate presence fixes this but it works.
1 parent c5e3d35 commit 66fed26

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

agentex-ui/components/agents-list/agents-list.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useRef } from 'react';
22

33
import { Agent } from 'agentex/resources';
4-
import { AnimatePresence, motion } from 'framer-motion';
4+
import { motion } from 'framer-motion';
55

66
import { AgentBadge } from '@/components/agents-list/agent-badge';
77
import { Skeleton } from '@/components/ui/skeleton';
@@ -38,11 +38,11 @@ export function AgentsList({ agents, isLoading = false }: AgentsListProps) {
3838
))}
3939
</>
4040
) : (
41-
<AnimatePresence mode="sync">
41+
<>
4242
{displayedAgents?.map(agent => (
4343
<AgentBadge key={agent.name} agent={agent} />
4444
))}
45-
</AnimatePresence>
45+
</>
4646
)}
4747
</motion.div>
4848
</TooltipProvider>

0 commit comments

Comments
 (0)