Skip to content

Commit 2499e1a

Browse files
committed
Format Next.js example files
1 parent 7e9472f commit 2499e1a

File tree

7 files changed

+13
-23
lines changed

7 files changed

+13
-23
lines changed

example/nextjs/app/error.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default function ErrorPage({ error, reset }) {
3030
<p className="eyebrow">Route Error Boundary</p>
3131
<h1>Something inside this route broke.</h1>
3232
<p>
33-
Client-only render errors are submitted here. Server-rendered failures already have a digest and are captured by
34-
`instrumentation.js` through `onRequestError`.
33+
Client-only render errors are submitted here. Server-rendered failures already have a digest and are captured by `instrumentation.js` through
34+
`onRequestError`.
3535
</p>
3636
<div className="error-actions">
3737
<button type="button" onClick={() => reset()}>

example/nextjs/app/global-error.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export default function GlobalError({ error, reset }) {
3232
<p className="eyebrow">Global Error Boundary</p>
3333
<h1>The root layout failed.</h1>
3434
<p>
35-
This is the last-resort client boundary for the App Router. In normal server-rendered failures we still prefer the
36-
richer `onRequestError` path.
35+
This is the last-resort client boundary for the App Router. In normal server-rendered failures we still prefer the richer `onRequestError` path.
3736
</p>
3837
<div className="error-actions">
3938
<button type="button" onClick={() => reset()}>

example/nextjs/app/globals.css

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ html,
2020
body {
2121
margin: 0;
2222
min-height: 100%;
23-
font-family:
24-
"Geist",
25-
"IBM Plex Sans",
26-
"Avenir Next",
27-
system-ui,
28-
sans-serif;
23+
font-family: "Geist", "IBM Plex Sans", "Avenir Next", system-ui, sans-serif;
2924
background:
3025
radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 35%),
31-
radial-gradient(circle at top right, rgba(210, 84, 30, 0.12), transparent 30%),
32-
var(--bg);
26+
radial-gradient(circle at top right, rgba(210, 84, 30, 0.12), transparent 30%), var(--bg);
3327
color: var(--text);
3428
}
3529

example/nextjs/app/page.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export default function HomePage() {
99
<p className="eyebrow">Exceptionless for Next.js</p>
1010
<h1>Client and server monitoring for Next.js.</h1>
1111
<p>
12-
This reference app keeps the setup small, but still captures the important Exceptionless signals across browser and
13-
server paths: logs, handled errors, unhandled errors, request metadata, and App Router error boundaries.
12+
This reference app keeps the setup small, but still captures the important Exceptionless signals across browser and server paths: logs, handled
13+
errors, unhandled errors, request metadata, and App Router error boundaries.
1414
</p>
1515
<div className="hero-meta">
1616
<span>Deployment target: {deploymentTarget}</span>
@@ -25,9 +25,8 @@ export default function HomePage() {
2525
<div className="panel-body">
2626
<h2>What the integration covers</h2>
2727
<p>
28-
The client path uses browser startup plus route boundaries. The server path uses `onRequestError`, explicit queue
29-
flushes, and a small request adapter so Exceptionless can attach rich request metadata to the same event builders we
30-
already use elsewhere.
28+
The client path uses browser startup plus route boundaries. The server path uses `onRequestError`, explicit queue flushes, and a small request
29+
adapter so Exceptionless can attach rich request metadata to the same event builders we already use elsewhere.
3130
</p>
3231
<ul className="note-list">
3332
<li>`instrumentation-client.js` starts Exceptionless before the app becomes interactive and logs route transitions.</li>

example/nextjs/components/ClientDemoPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export default function ClientDemoPanel() {
8484
<div className="panel-body">
8585
<h2>Try the integration</h2>
8686
<p>
87-
The first four buttons stay in the browser. The next two go through a real Next route handler. The link at the bottom
88-
opens a route that throws during server rendering.
87+
The first four buttons stay in the browser. The next two go through a real Next route handler. The link at the bottom opens a route that throws during
88+
server rendering.
8989
</p>
9090

9191
<div className="button-grid">

example/nextjs/lib/exceptionless-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function startup() {
4040
framework: "Next.js",
4141
router: "App Router",
4242
runtime: "nodejs",
43-
...(process.env.VERCEL_ENV ?? process.env.NODE_ENV ? { deployment: process.env.VERCEL_ENV ?? process.env.NODE_ENV } : {}),
43+
...((process.env.VERCEL_ENV ?? process.env.NODE_ENV) ? { deployment: process.env.VERCEL_ENV ?? process.env.NODE_ENV } : {}),
4444
...(process.env.VERCEL_REGION ? { region: process.env.VERCEL_REGION } : {}),
4545
...(process.env.VERCEL_URL ? { url: process.env.VERCEL_URL } : {}),
4646
...(process.env.VERCEL_GIT_COMMIT_SHA ? { commit: process.env.VERCEL_GIT_COMMIT_SHA } : {})

example/nextjs/lib/next-request.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ function normalizeHeaders(headers) {
3737
return Object.fromEntries(Array.from(headers.entries()).map(([key, value]) => [key.toLowerCase(), value]));
3838
}
3939

40-
return Object.fromEntries(
41-
Object.entries(headers).map(([key, value]) => [key.toLowerCase(), Array.isArray(value) ? value.join(", ") : String(value)])
42-
);
40+
return Object.fromEntries(Object.entries(headers).map(([key, value]) => [key.toLowerCase(), Array.isArray(value) ? value.join(", ") : String(value)]));
4341
}
4442

4543
function getOrigin(headers) {

0 commit comments

Comments
 (0)