(props)
| 6 | import { PaneView, PaneViewProps } from '../base' |
| 7 | |
| 8 | export const ImageView: React.FC<PaneViewProps> = (props) => { |
| 9 | const { focusedBookTab } = useReaderSnapshot() |
| 10 | const sections = focusedBookTab?.sections?.filter((s) => s.images.length) as |
| 11 | | ISection[] |
| 12 | | undefined |
| 13 | |
| 14 | if ((sections?.length ?? 0) > 500) return null |
| 15 | |
| 16 | return ( |
| 17 | <PaneView {...props}> |
| 18 | <div className="scroll"> |
| 19 | {sections?.map((s) => ( |
| 20 | <Block key={s.href} section={s} /> |
| 21 | ))} |
| 22 | </div> |
| 23 | </PaneView> |
| 24 | ) |
| 25 | } |
| 26 | |
| 27 | interface BlockProps { |
| 28 | section: ISection |
nothing calls this directly
no test coverage detected