Update selectedStoryData whenever its story changes

This commit is contained in:
Josh Perez 2022-07-29 16:22:55 -04:00 committed by GitHub
parent 58aaf1d0e7
commit c3bb3b152e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 19 deletions

View file

@ -25,7 +25,7 @@ import {
getMenuOptions,
} from '../selectors/user';
import {
getSelectedStoryData,
hasSelectedStoryData,
shouldShowStoriesView,
} from '../selectors/stories';
import { getHideMenuBar } from '../selectors/items';
@ -65,7 +65,7 @@ const mapStateToProps = (state: StateType) => {
<SmartStories />
</ErrorBoundary>
),
selectedStoryData: getSelectedStoryData(state),
hasSelectedStoryData: hasSelectedStoryData(state),
renderStoryViewer: () => (
<ErrorBoundary>
<SmartStoryViewer />