import React from "react" import Link from "next/link" import { usePathname } from "next/navigation" import { useAccount } from "@/lib/providers/jazz-provider" import { cn } from "@/lib/utils" import { LaIcon } from "@/components/custom/la-icon" import { ListOfTopics } from "@/lib/schema" import { LEARNING_STATES, LearningStateValue } from "@/lib/constants" export const TopicSection: React.FC<{ pathname: string }> = ({ pathname }) => { const { me } = useAccount({ root: { topicsWantToLearn: [], topicsLearning: [], topicsLearned: [] } }) const topicCount = (me?.root.topicsWantToLearn?.length || 0) + (me?.root.topicsLearning?.length || 0) + (me?.root.topicsLearned?.length || 0) const isActive = pathname.startsWith("/topics") if (!me) return null return (
Topics {topicCount > 0 && {topicCount}}
{label}