Skip to content

Commit f581ee4

Browse files
authored
Merge pull request #48 from knowlyai/feature/user-info
Feature - Add User Info Page
2 parents edbde42 + 4d83e6f commit f581ee4

8 files changed

Lines changed: 959 additions & 0 deletions

File tree

package-lock.json

Lines changed: 230 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@radix-ui/react-dropdown-menu": "^2.1.14",
1717
"@radix-ui/react-label": "^2.1.7",
1818
"@radix-ui/react-popover": "^1.1.14",
19+
"@radix-ui/react-select": "^2.2.5",
1920
"@radix-ui/react-slot": "^1.2.3",
2021
"@radix-ui/react-tooltip": "^1.2.7",
2122
"@tailwindcss/vite": "^4.1.5",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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

Comments
 (0)