diff --git a/packages/frontend/src/components/Layout.tsx b/packages/frontend/src/components/Layout.tsx index ed01196..2ba1005 100644 --- a/packages/frontend/src/components/Layout.tsx +++ b/packages/frontend/src/components/Layout.tsx @@ -6,6 +6,7 @@ import { UserMenu } from './UserMenu.js'; const navItems = [ { to: '/', label: 'Dashboard', end: true }, { to: '/admin', label: 'Lessen' }, + { to: '/marketplace', label: 'Marketplace πŸ›οΈ' }, { to: '/stats', label: 'Stats' }, ]; diff --git a/packages/frontend/src/components/LessonTree.tsx b/packages/frontend/src/components/LessonTree.tsx index df4fd38..cce710e 100644 --- a/packages/frontend/src/components/LessonTree.tsx +++ b/packages/frontend/src/components/LessonTree.tsx @@ -3,9 +3,11 @@ import { Link } from 'react-router-dom'; import type { LessonTreeNode } from '@flashcard/shared'; import { lessonsApi } from '../api/lessons.js'; import { useLessons } from '../stores/lessonsStore.js'; +import { useAuth } from '../stores/authStore.js'; export function LessonTree({ nodes, depth = 0 }: { nodes: LessonTreeNode[]; depth?: number }) { const refresh = useLessons((s) => s.refresh); + const currentUserId = useAuth((s) => s.user?.id); const [addingTo, setAddingTo] = useState(null); const [name, setName] = useState(''); @@ -32,57 +34,59 @@ export function LessonTree({ nodes, depth = 0 }: { nodes: LessonTreeNode[]; dept return ( ); }