| 20 | } |
| 21 | |
| 22 | interface SectionState { |
| 23 | sections: Array<Section> |
| 24 | visibleSections: Array<string> |
| 25 | setVisibleSections: (visibleSections: Array<string>) => void |
| 26 | registerHeading: ({ |
| 27 | id, |
| 28 | ref, |
| 29 | offsetRem, |
| 30 | }: { |
| 31 | id: string |
| 32 | ref: React.RefObject<HTMLHeadingElement> |
| 33 | offsetRem: number |
| 34 | }) => void |
| 35 | } |
| 36 | |
| 37 | function createSectionStore(sections: Array<Section>) { |
| 38 | return createStore<SectionState>()((set) => ({ |
nothing calls this directly
no outgoing calls
no test coverage detected