MCPcopy Create free account
hub / github.com/chart-kit/react-native-chart-kit-example / getPageSelectionForStory

Function getPageSelectionForStory

App.tsx:195–211  ·  view source on GitHub ↗
(
  storyId: string | null | undefined,
)

Source from the content-addressed store, hash-verified

193};
194
195const getPageSelectionForStory = (
196 storyId: string | null | undefined,
197): PageSelection | undefined => {
198 if (!storyId) {
199 return undefined;
200 }
201
202 for (const mode of allShowcaseModes) {
203 for (const page of mode.pages) {
204 if (getShowcasePageStoryIds(page).includes(storyId)) {
205 return { mode, page };
206 }
207 }
208 }
209
210 return undefined;
211};
212
213const getPageSelection = ({
214 pageId,

Callers 1

getPageSelectionFunction · 0.85

Calls 1

getShowcasePageStoryIdsFunction · 0.90

Tested by

no test coverage detected