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

Function selectPage

App.tsx:452–469  ·  view source on GitHub ↗
(selection: PageSelection, storyId?: string)

Source from the content-addressed store, hash-verified

450 }, [applySearchParams]);
451
452 const selectPage = (selection: PageSelection, storyId?: string) => {
453 const nextStoryId = storyId ?? getShowcasePageStoryIds(selection.page)[0];
454 const nextStory = stories.find((story) => story.id === nextStoryId);
455
456 setIsScrubbing(false);
457 if (nextStory) {
458 setVisualStory(nextStory);
459 }
460 setPageSelection(selection);
461 updateShowcaseUrl({
462 chartPreset,
463 isVisualMode,
464 rendererMode,
465 selection,
466 storyId,
467 themeMode,
468 });
469 };
470 const selectAppDemo = (page: ShowcasePage, storyId: string) => {
471 selectPage({ mode: publicChartMode, page }, storyId);
472 };

Callers 3

selectAppDemoFunction · 0.85
exitTakeoverFunction · 0.85
AppFunction · 0.85

Calls 2

getShowcasePageStoryIdsFunction · 0.90
updateShowcaseUrlFunction · 0.85

Tested by

no test coverage detected