-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribed to another event in order to trigger theme change on story change #10
Subscribed to another event in order to trigger theme change on story change #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlesnunez Thanks for the contribution! Just one small change
src/Tool.tsx
Outdated
}); | ||
React.useEffect(() => { | ||
const channel = props.api.getChannel(); | ||
channel.on('storyChanged', () => renderTheme()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this just be the following?
channel.on('storyChanged', () => renderTheme()); | |
channel.on('storyChanged', renderTheme); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that there not be any problem! I'll commit the change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made @hipstersmoothie !
What's the status of this one? |
Good and fast job done @hipstersmoothie !!! |
What does this PR do?
This PR fixes a bug related to the moment in which we navigate through stories with a theme different to the base configured theme.
In order to fix it we will subscribe to another event that will trigger the same exact logic that the one triggered on stories configured.
It fixes issue: #9