Skip to content

Commit 489b457

Browse files
dreynowclaude
andcommitted
fix: Add Client form animation - remove height:0->auto, use simple fade
The AnimatePresence height animation was collapsing to zero and never expanding. Replaced with simple opacity+y fade. Removed AnimatePresence import. Fixed JSX nesting (extra closing div). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a45ece2 commit 489b457

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

‎apps/observatory/src/pages/ClientsPage.tsx‎

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from 'react';
22
import { useNavigate } from 'react-router-dom';
3-
import { motion, AnimatePresence } from 'framer-motion';
3+
import { motion } from 'framer-motion';
44
import { Building2, Plus, ArrowRight, Check, Trash2, Users, Clock, AlertTriangle, Link2 } from 'lucide-react';
55
import { useClients, type Client } from '../hooks/useClients';
66

@@ -84,15 +84,14 @@ export const ClientsPage: React.FC = () => {
8484
</motion.div>
8585

8686
{/* Add Client Form */}
87-
<AnimatePresence>
88-
{showAdd && (
89-
<motion.div
90-
initial={{ opacity: 0, height: 0 }}
91-
animate={{ opacity: 1, height: 'auto' }}
92-
exit={{ opacity: 0, height: 0 }}
93-
className="overflow-hidden mb-6"
94-
>
95-
<motion.div variants={fadeUp} className="bg-white border border-[#E8DCC4] rounded-lg p-5 shadow-[0_2px_8px_rgba(26,24,20,0.06)]">
87+
{showAdd && (
88+
<motion.div
89+
initial={{ opacity: 0, y: -8 }}
90+
animate={{ opacity: 1, y: 0 }}
91+
transition={{ duration: 0.2 }}
92+
className="mb-6"
93+
>
94+
<div className="bg-white border border-[#E8DCC4] rounded-lg p-5 shadow-[0_2px_8px_rgba(26,24,20,0.06)]">
9695
<div className="flex items-center gap-2 mb-4">
9796
<Building2 className="w-4 h-4 text-[#B08D3E]" />
9897
<span className="text-xs font-semibold text-[#1A1814]">Add a Client Firm</span>
@@ -146,10 +145,9 @@ export const ClientsPage: React.FC = () => {
146145
or <button onClick={() => navigate('/connect')} className="text-[#B08D3E] hover:text-[#C5A572] ml-1 font-medium transition-colors">connect QuickBooks</button> to auto-import
147146
</span>
148147
</div>
149-
</motion.div>
150-
</motion.div>
151-
)}
152-
</AnimatePresence>
148+
</div>
149+
</motion.div>
150+
)}
153151

154152
{/* Error state */}
155153
{error && !loading && (

0 commit comments

Comments
 (0)