Adds ErrorBoundary around stories
This commit is contained in:
parent
37f9346f57
commit
d7ec2e9d82
5 changed files with 85 additions and 3 deletions
|
@ -33,13 +33,16 @@ import { getConversationsStoppingSend } from '../selectors/conversations';
|
|||
import { getIsCustomizingPreferredReactions } from '../selectors/preferredReactions';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog';
|
||||
import { ErrorBoundary } from '../../components/ErrorBoundary';
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
const i18n = getIntl(state);
|
||||
|
||||
return {
|
||||
...state.app,
|
||||
conversationsStoppingSend: getConversationsStoppingSend(state),
|
||||
getPreferredBadge: getPreferredBadgeSelector(state),
|
||||
i18n: getIntl(state),
|
||||
i18n,
|
||||
localeMessages: getLocaleMessages(state),
|
||||
isCustomizingPreferredReactions: getIsCustomizingPreferredReactions(state),
|
||||
isMaximized: getIsMainWindowMaximized(state),
|
||||
|
@ -57,9 +60,17 @@ const mapStateToProps = (state: StateType) => {
|
|||
<SmartSafetyNumberViewer {...props} />
|
||||
),
|
||||
isShowingStoriesView: shouldShowStoriesView(state),
|
||||
renderStories: () => <SmartStories />,
|
||||
renderStories: () => (
|
||||
<ErrorBoundary>
|
||||
<SmartStories />
|
||||
</ErrorBoundary>
|
||||
),
|
||||
selectedStoryData: getSelectedStoryData(state),
|
||||
renderStoryViewer: () => <SmartStoryViewer />,
|
||||
renderStoryViewer: () => (
|
||||
<ErrorBoundary>
|
||||
<SmartStoryViewer />
|
||||
</ErrorBoundary>
|
||||
),
|
||||
requestVerification: (
|
||||
type: 'sms' | 'voice',
|
||||
number: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue