Skip to content

Commit 63bbb4c

Browse files
committed
Fix page crash when using useTxNotifications on pages without ChakraProvider, restore latest sentry version (#5179)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating dependencies and modifying the error message presentation in the `errorParser.tsx` file. It upgrades several `@sentry` packages and refines the structure of the error messages displayed to users. ### Detailed summary - Updated `@sentry/nextjs` from `8.34.0` to `8.35.0`. - Changed the `PLEASE_REACH_OUT_MESSAGE` structure from using `<Text>` to a `<span>`. - Updated the class name for the `<Link>` from `font-bold` to `font-semibold`. - Modified error message rendering in `parseErrorToMessage` to use `<span>` instead of `<Text>`. - Updated several `@sentry` internal dependencies to version `8.35.0` across `pnpm-lock.yaml`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 4cb7f8f commit 63bbb4c

File tree

3 files changed

+101
-106
lines changed

3 files changed

+101
-106
lines changed

apps/dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@radix-ui/react-slot": "^1.1.0",
4747
"@radix-ui/react-switch": "^1.1.1",
4848
"@radix-ui/react-tooltip": "1.1.3",
49-
"@sentry/nextjs": "8.34.0",
49+
"@sentry/nextjs": "8.35.0",
5050
"@shazow/whatsabi": "^0.15.4",
5151
"@stripe/react-stripe-js": "^2.8.1",
5252
"@stripe/stripe-js": "^3.5.0",

apps/dashboard/src/utils/errorParser.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import Link from "next/link";
22
import posthog from "posthog-js";
3-
import { Text } from "tw-components";
43

54
const PLEASE_REACH_OUT_MESSAGE = (
6-
<Text as="span" color="inherit">
5+
<span>
76
If you believe this is incorrect or the error persists, please visit our{" "}
8-
<Link className="font-bold underline" target="_blank" href="/support">
7+
<Link className="font-semibold underline" target="_blank" href="/support">
98
support site
109
</Link>
1110
.
12-
</Text>
11+
</span>
1312
);
1413

1514
const UNKNOWN_ERROR_MESSAGE = "An unknown error occurred, please try again.";
@@ -19,12 +18,8 @@ export function parseErrorToMessage(error: unknown): string | JSX.Element {
1918

2019
return (
2120
<div className="flex flex-col gap-4">
22-
<Text as="span" color="inherit" noOfLines={3}>
23-
{message}
24-
</Text>
25-
<Text fontStyle="italic" as="span" color="inherit">
26-
{PLEASE_REACH_OUT_MESSAGE}
27-
</Text>
21+
<span className="line-clamp-3">{message}</span>
22+
<span className="italic">{PLEASE_REACH_OUT_MESSAGE}</span>
2823
</div>
2924
);
3025
}

pnpm-lock.yaml

Lines changed: 95 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)