|
| 1 | +import { useNavigate, useParams } from 'react-router-dom' |
| 2 | +import { Layout } from '@/shared/components/layout' |
| 3 | +import { motion } from 'framer-motion' |
| 4 | +import { BrainCircuit, User } from 'lucide-react' |
| 5 | +import { Sidebar, SidebarItem } from '@/shared/components/sidebar' |
| 6 | + |
| 7 | +// Sidebar items |
| 8 | +const sidebarItems: SidebarItem[] = [ |
| 9 | + { label: 'Dados de cadastro', icon: <User />, key: 'dados' }, |
| 10 | + { label: 'Minhas bases', icon: <BrainCircuit />, key: 'bases' } |
| 11 | +] |
| 12 | + |
| 13 | +export function UserBasesPage() { |
| 14 | + const { userId } = useParams<{ userId: string }>() |
| 15 | + const navigate = useNavigate() |
| 16 | + const selected = 'bases' |
| 17 | + |
| 18 | + function handleSidebarSelect(key: string) { |
| 19 | + if (key === 'dados') { |
| 20 | + navigate(`/user-info/${userId}`) |
| 21 | + } |
| 22 | + // Se já está em "bases", não faz nada |
| 23 | + } |
| 24 | + |
| 25 | + return ( |
| 26 | + <Layout className="bg-background min-h-screen min-w-screen"> |
| 27 | + <Sidebar |
| 28 | + items={sidebarItems} |
| 29 | + selected={selected} |
| 30 | + setSelected={handleSidebarSelect} |
| 31 | + onLogout={() => navigate('/')} |
| 32 | + /> |
| 33 | + <main className="justify-top mt-20 flex flex-1 flex-col items-center p-12"> |
| 34 | + <motion.div |
| 35 | + initial={{ opacity: 0, y: 20 }} |
| 36 | + animate={{ opacity: 1, y: 0 }} |
| 37 | + transition={{ duration: 0.5 }} |
| 38 | + className="w-full max-w-xl" |
| 39 | + > |
| 40 | + <section> |
| 41 | + <h1 className="text-foreground mb-6 text-center text-4xl font-semibold drop-shadow-xl sm:text-6xl"> |
| 42 | + Minhas bases |
| 43 | + </h1> |
| 44 | + <p className="text-foreground/70 text-center text-xl"> |
| 45 | + Aqui você verá suas bases cadastradas. |
| 46 | + </p> |
| 47 | + {/* Adicione aqui a listagem das bases do usuário */} |
| 48 | + </section> |
| 49 | + </motion.div> |
| 50 | + </main> |
| 51 | + </Layout> |
| 52 | + ) |
| 53 | +} |
| 54 | + |
| 55 | +export default UserBasesPage |
0 commit comments