Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
docs: respect dark mode in global error page
Use prefers-color-scheme media query so the global error page matches the user's OS theme preference instead of always showing light colors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 3, 2026 at 17:06 UTC
00d730ef7ba54f20e42fdb7a614ae04ccbe4b7a2
1 file changed
+27
-5
docs/app/global-error.tsx
+27
-5
@@ -8,29 +8,51 @@ export default function GlobalError({
8
}) {
9
return (
10
<html lang="en">
11
- <body style={{ margin: 0, fontFamily: 'Inter, system-ui, sans-serif' }}>
11
+ <head>
12
+ <style
13
+ dangerouslySetInnerHTML={{
14
+ __html: `
15
+ body { margin: 0; font-family: Inter, system-ui, sans-serif; background: #fff; color: #171414; }
16
+ .ge-heading { color: rgba(0,0,0,0.1); }
17
+ .ge-muted { color: #666; }
18
+ .ge-btn-primary { background: #171414; color: #fff; border: none; }
19
+ .ge-btn-secondary { background: #fff; color: #171414; border: 1px solid #e5e0df; }
20
+ @media (prefers-color-scheme: dark) {
21
+ body { background: #131211; color: #e8e4e0; }
22
+ .ge-heading { color: rgba(255,255,255,0.1); }
23
+ .ge-muted { color: #a8a29e; }
24
+ .ge-btn-primary { background: #e8e4e0; color: #1a1815; }
25
+ .ge-btn-secondary { background: #1e1d1c; color: #e8e4e0; border-color: #2c2a28; }
26
+ }
27
+ `,
28
+ }}
29
+ />
30
+ </head>
31
+ <body>
32
<div style={{ display: 'flex', minHeight: '100vh', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', padding: '1rem' }}>
13
- <h1 style={{ fontSize: '6rem', fontWeight: 700, letterSpacing: '-0.05em', color: 'rgba(0,0,0,0.1)', margin: 0, lineHeight: 1 }}>
33
+ <h1 className="ge-heading" style={{ fontSize: '6rem', fontWeight: 700, letterSpacing: '-0.05em', margin: 0, lineHeight: 1 }}>
34
500
35
</h1>
36
<div style={{ marginTop: '0.5rem', textAlign: 'center', maxWidth: '28rem' }}>
37
<h2 style={{ fontSize: '1.25rem', fontWeight: 600, margin: 0 }}>
38
Something went wrong
39
</h2>
20
- <p style={{ marginTop: '0.5rem', color: '#666', fontSize: '0.875rem' }}>
40
+ <p className="ge-muted" style={{ marginTop: '0.5rem', fontSize: '0.875rem' }}>
41
An unexpected error occurred. Try again or head back to the docs.
42
</p>
43
</div>
44
<div style={{ marginTop: '2rem', display: 'flex', gap: '0.75rem' }}>
45
<button
46
+ className="ge-btn-primary"
47
onClick={reset}
27
- style={{ padding: '0.5rem 1rem', fontSize: '0.875rem', fontWeight: 500, borderRadius: '0.5rem', border: 'none', background: '#171414', color: '#fff', cursor: 'pointer' }}
48
+ style={{ padding: '0.5rem 1rem', fontSize: '0.875rem', fontWeight: 500, borderRadius: '0.5rem', cursor: 'pointer' }}
49
>
50
Try again
51
</button>
52
<a
53
+ className="ge-btn-secondary"
54
href="/"
33
- style={{ padding: '0.5rem 1rem', fontSize: '0.875rem', fontWeight: 500, borderRadius: '0.5rem', border: '1px solid #e5e0df', background: '#fff', color: '#171414', textDecoration: 'none' }}
55
+ style={{ padding: '0.5rem 1rem', fontSize: '0.875rem', fontWeight: 500, borderRadius: '0.5rem', textDecoration: 'none' }}
56
>
57
Home
58
</a>