mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
- redesigns the default global + default error boundaries. removing the WSOD forever :/ - adds dark mode support - unifies a bit of the styling - add the digest for the server error - adds a return button on the client errors <img width="3328" height="1914" alt="CleanShot 2026-01-02 at 09 46 36@2x" src="https://github.com/user-attachments/assets/9994eb37-c22b-4847-9a18-e9acf0ae6236" /> <img width="2144" height="1242" alt="CleanShot 2026-01-02 at 09 47 01@2x" src="https://github.com/user-attachments/assets/9b3bcf39-63f6-4c8d-85c5-2976c25f5b7b" /> <img width="2238" height="1632" alt="CleanShot 2026-01-02 at 09 47 17@2x" src="https://github.com/user-attachments/assets/436433d7-9873-496a-9c96-536e070be9d7" /> <img width="1708" height="1260" alt="CleanShot 2026-01-02 at 09 47 23@2x" src="https://github.com/user-attachments/assets/1ec42402-dbd9-41a3-801b-4745a4f128f7" /> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
21 lines
398 B
JavaScript
21 lines
398 B
JavaScript
'use client'
|
|
|
|
import { useState } from 'react'
|
|
|
|
export default function TriggerErrorPage() {
|
|
const [shouldError, setShouldError] = useState(false)
|
|
|
|
if (shouldError) {
|
|
throw new Error('Test client error')
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<h1>Trigger Error Page</h1>
|
|
<button id="trigger-error" onClick={() => setShouldError(true)}>
|
|
Trigger Error
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|