@@ -70,16 +70,14 @@ export const DocsContainer: React.FC<{
7070 * This is admittedly a bit fragile - when updating Storybook this likely will need to be changed
7171 */
7272 // Try multiple sources for storyId since it can be in different places depending on environment
73- const storyIdFromSpecified = ( context ?. channel as any ) ?. data
74- ?. storySpecified ?. [ 0 ] ?. storyId ;
75- const storyIdFromCurrent = ( context ?. channel as any ) ?. data
76- ?. currentStoryWasSet ?. [ 0 ] ?. storyId ;
77- const storyId = storyIdFromSpecified || storyIdFromCurrent ;
73+
74+ const storyId = ( context ?. channel as any ) ?. data ?. currentStoryWasSet ?. [ 0 ]
75+ ?. storyId ;
7876
7977 const globalTheme =
8078 ( context as any ) . store . userGlobals ?. globals ?. theme || 'core' ;
8179
82- const { selectedTheme , currentTheme } = useMemo ( ( ) => {
80+ const { currentTheme } = useMemo ( ( ) => {
8381 const findThemeStory : keyof typeof themeSpecificStories | undefined =
8482 storyId ;
8583
@@ -97,11 +95,7 @@ export const DocsContainer: React.FC<{
9795 } ;
9896 } , [ storyId , globalTheme ] ) ;
9997
100- // Debug logging
101- console . log ( 'storyIdFromSpecified:' , storyIdFromSpecified ) ;
102- console . log ( 'storyIdFromCurrent:' , storyIdFromCurrent ) ;
103- console . log ( 'final storyId:' , storyId ) ;
104- console . log ( 'selectedTheme:' , selectedTheme ) ;
98+ // Debuglogging
10599
106100 return (
107101 < StorybookDocsContainer theme = { theme } context = { context } { ...rest } >
0 commit comments