import React from "react" import { Section } from "./section" import { LaAccount, ListOfSections, PersonalLinkLists, Topic, UserRoot } from "@/lib/schema" interface TopicSectionsProps { topic: Topic sections: (ListOfSections | null) | undefined activeIndex: number setActiveIndex: (index: number) => void linkRefs: React.MutableRefObject<(HTMLLIElement | null)[]> containerRef: React.RefObject } export function TopicSections({ topic, sections, activeIndex, setActiveIndex, linkRefs, containerRef, }: TopicSectionsProps) { return (
{sections?.map( (section, sectionIndex) => section?.id && (
acc + (s?.links?.length || 0), 0)} linkRefs={linkRefs} /> ) )}
) }