|
1 | 1 | import { NotFoundPage } from 'nextra-theme-docs' |
2 | 2 |
|
| 3 | +const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? '' |
| 4 | + |
| 5 | +const links = [ |
| 6 | + { href: '/', label: 'Introduction' }, |
| 7 | + { href: '/getting-started', label: 'Getting Started' }, |
| 8 | + { href: '/sending-messages', label: 'Sending Messages' }, |
| 9 | + { href: '/api-reference', label: 'API Reference' }, |
| 10 | + { href: '/troubleshooting', label: 'Troubleshooting & FAQ' }, |
| 11 | +] |
| 12 | + |
3 | 13 | export default function NotFound() { |
4 | 14 | return ( |
5 | 15 | <NotFoundPage content="Report a broken link" labels="broken-link"> |
6 | | - <h1>404 — Page not found</h1> |
| 16 | + <div style={{ textAlign: 'center', maxWidth: 560, margin: '0 auto' }}> |
| 17 | + <div style={{ fontSize: '5rem', fontWeight: 800, lineHeight: 1, letterSpacing: '-0.04em', opacity: 0.9 }}>404</div> |
| 18 | + <h1 style={{ marginTop: '0.5rem' }}>This page got disconnected</h1> |
| 19 | + <p style={{ opacity: 0.7, marginTop: '0.5rem' }}> |
| 20 | + The page you’re looking for doesn’t exist or was moved. Try the search above, or jump to a popular page: |
| 21 | + </p> |
| 22 | + <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', justifyContent: 'center', marginTop: '1.25rem' }}> |
| 23 | + {links.map((l) => ( |
| 24 | + <a |
| 25 | + key={l.href} |
| 26 | + href={`${basePath}${l.href === '/' ? '' : l.href}`} |
| 27 | + style={{ |
| 28 | + padding: '0.4rem 0.85rem', |
| 29 | + fontSize: '0.85rem', |
| 30 | + fontWeight: 500, |
| 31 | + borderRadius: 999, |
| 32 | + border: '1px solid light-dark(rgba(0,0,0,0.14), rgba(255,255,255,0.16))', |
| 33 | + textDecoration: 'none', |
| 34 | + color: 'inherit', |
| 35 | + }} |
| 36 | + > |
| 37 | + {l.label} |
| 38 | + </a> |
| 39 | + ))} |
| 40 | + </div> |
| 41 | + </div> |
7 | 42 | </NotFoundPage> |
8 | 43 | ) |
9 | 44 | } |
0 commit comments