import * as React from "react" 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" import { Link } from "@tanstack/react-router" export const TopicSection: React.FC = () => { const { me } = useAccount({ root: { topicsWantToLearn: [], topicsLearning: [], topicsLearned: [], }, }) const topicCount = (me?.root.topicsWantToLearn?.length || 0) + (me?.root.topicsLearning?.length || 0) + (me?.root.topicsLearned?.length || 0) if (!me) return null return (
Topics {topicCount > 0 && ( {topicCount} )}
) interface ListProps { topicsWantToLearn: ListOfTopics topicsLearning: ListOfTopics topicsLearned: ListOfTopics } const List: React.FC{label}