(selection: PageSelection, storyId?: string)
| 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 | }; |
no test coverage detected