Add crash test button to Storybook for Sentry verification

Throws an uncaught error from a press handler so it reaches Sentry's
global error handler; fatal in production builds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhCxLTu44o84eWMM8ESWTr
This commit is contained in:
Claude
2026-07-15 14:26:47 +00:00
parent 3c5c11c002
commit 9cc36ad57b
+15
View File
@@ -110,6 +110,21 @@ export default function Storybook() {
</Button>
<InviteFriendsDialog control={inviteFriendsControl} />
<Button
color="negative"
size="large"
onPress={() => {
/*
* Intentionally uncaught so it reaches Sentry's global error
* handler. In production builds this is a fatal crash.
*/
throw new Error('Test crash from Storybook')
}}
label="Crash the app"
testID="storybookCrashBtn">
<ButtonText>Crash the app (test Sentry)</ButtonText>
</Button>
<ThemeProvider theme="light">
<Theming />
</ThemeProvider>