MCPcopy Create free account
hub / github.com/pacexy/flow / ImageView

Function ImageView

apps/reader/src/components/viewlets/ImageView.tsx:8–25  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

6import { PaneView, PaneViewProps } from '../base'
7
8export 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
27interface BlockProps {
28 section: ISection

Callers

nothing calls this directly

Calls 3

useReaderSnapshotFunction · 0.90
filterMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected