|
1 | 1 | import { useState } from 'react'; |
2 | 2 | import { useNavigate } from 'react-router-dom'; |
3 | | -import { motion, AnimatePresence } from 'framer-motion'; |
| 3 | +import { motion } from 'framer-motion'; |
4 | 4 | import { Building2, Plus, ArrowRight, Check, Trash2, Users, Clock, AlertTriangle, Link2 } from 'lucide-react'; |
5 | 5 | import { useClients, type Client } from '../hooks/useClients'; |
6 | 6 |
|
@@ -84,15 +84,14 @@ export const ClientsPage: React.FC = () => { |
84 | 84 | </motion.div> |
85 | 85 |
|
86 | 86 | {/* 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)]"> |
96 | 95 | <div className="flex items-center gap-2 mb-4"> |
97 | 96 | <Building2 className="w-4 h-4 text-[#B08D3E]" /> |
98 | 97 | <span className="text-xs font-semibold text-[#1A1814]">Add a Client Firm</span> |
@@ -146,10 +145,9 @@ export const ClientsPage: React.FC = () => { |
146 | 145 | or <button onClick={() => navigate('/connect')} className="text-[#B08D3E] hover:text-[#C5A572] ml-1 font-medium transition-colors">connect QuickBooks</button> to auto-import |
147 | 146 | </span> |
148 | 147 | </div> |
149 | | - </motion.div> |
150 | | - </motion.div> |
151 | | - )} |
152 | | - </AnimatePresence> |
| 148 | + </div> |
| 149 | + </motion.div> |
| 150 | + )} |
153 | 151 |
|
154 | 152 | {/* Error state */} |
155 | 153 | {error && !loading && ( |
|
0 commit comments