-
Notifications
You must be signed in to change notification settings - Fork 38
Development -> main #2190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development -> main #2190
Changes from all commits
8e78352
a764d27
9283fc8
bc6d62e
ebc69ff
591be05
65e54cb
f0095aa
e3ba810
9cba0ec
573da80
0068bcf
a827ec0
b3ba7fa
71dd106
92812d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { Backpack } from 'lucide-react'; | ||
| import Link from 'next/link'; | ||
|
|
||
| export default function NotFound() { | ||
| return ( | ||
| <div className="min-h-screen flex items-center justify-center bg-background"> | ||
| <div className="text-center px-4"> | ||
| <div className="flex justify-center mb-6"> | ||
| <div className="bg-primary/10 rounded-full p-6 inline-flex"> | ||
| <Backpack className="w-12 h-12 text-primary" /> | ||
| </div> | ||
| </div> | ||
| <h1 className="text-8xl font-extrabold text-foreground mb-2 leading-none">404</h1> | ||
| <p className="text-xl font-semibold text-foreground mb-2">Page not found</p> | ||
| <p className="text-muted-foreground max-w-xs mx-auto mb-8"> | ||
| This admin page doesn't exist. Head back to the dashboard. | ||
| </p> | ||
| <Link | ||
| href="/dashboard" | ||
| className="inline-flex items-center justify-center rounded-lg bg-primary px-6 py-2.5 text-sm font-semibold text-primary-foreground hover:bg-primary/90 transition-colors" | ||
| > | ||
| Back to dashboard | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import { Backpack } from 'lucide-react'; | ||
|
|
||
| export default function Custom404() { | ||
| return ( | ||
| <div | ||
| style={{ | ||
| minHeight: '100vh', | ||
| display: 'flex', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| background: '#0f172a', | ||
| fontFamily: 'system-ui, sans-serif', | ||
| }} | ||
| > | ||
| <div style={{ textAlign: 'center', padding: '0 1rem' }}> | ||
| <div style={{ display: 'flex', justifyContent: 'center', marginBottom: '1.5rem' }}> | ||
| <div | ||
| style={{ | ||
| background: 'rgba(15,118,110,0.15)', | ||
| borderRadius: '9999px', | ||
| padding: '1.5rem', | ||
| display: 'inline-flex', | ||
| }} | ||
| > | ||
| <Backpack size={48} color="#14b8a6" /> | ||
| </div> | ||
| </div> | ||
| <h1 | ||
| style={{ | ||
| fontSize: '5rem', | ||
| fontWeight: 800, | ||
| color: '#f8fafc', | ||
| margin: '0 0 0.5rem', | ||
| lineHeight: 1, | ||
| }} | ||
| > | ||
| 404 | ||
| </h1> | ||
| <p style={{ fontSize: '1.25rem', fontWeight: 600, color: '#f8fafc', margin: '0 0 0.5rem' }}> | ||
| Page not found | ||
| </p> | ||
| <p style={{ color: '#94a3b8', maxWidth: '22rem', margin: '0 auto 2rem' }}> | ||
| This admin page doesn't exist. Head back to the dashboard. | ||
| </p> | ||
| <a | ||
| href="/dashboard" | ||
| style={{ | ||
| background: '#0f766e', | ||
| color: '#fff', | ||
| padding: '0.625rem 1.5rem', | ||
| borderRadius: '0.5rem', | ||
| fontWeight: 600, | ||
| textDecoration: 'none', | ||
| fontSize: '1rem', | ||
| }} | ||
| > | ||
| Back to dashboard | ||
| </a> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| import { AlertTriangle } from 'lucide-react'; | ||
|
|
||
| export default function Custom500() { | ||
| return ( | ||
| <div | ||
|
Comment on lines
+1
to
+5
|
||
| style={{ | ||
| minHeight: '100vh', | ||
| display: 'flex', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| background: '#0f172a', | ||
| fontFamily: 'system-ui, sans-serif', | ||
| }} | ||
| > | ||
| <div style={{ textAlign: 'center', padding: '0 1rem' }}> | ||
| <div style={{ display: 'flex', justifyContent: 'center', marginBottom: '1.5rem' }}> | ||
| <div | ||
| style={{ | ||
| background: 'rgba(239,68,68,0.15)', | ||
| borderRadius: '9999px', | ||
| padding: '1.5rem', | ||
| display: 'inline-flex', | ||
| }} | ||
| > | ||
| <AlertTriangle size={48} color="#ef4444" /> | ||
| </div> | ||
| </div> | ||
| <h1 | ||
| style={{ | ||
| fontSize: '5rem', | ||
| fontWeight: 800, | ||
| color: '#f8fafc', | ||
| margin: '0 0 0.5rem', | ||
| lineHeight: 1, | ||
| }} | ||
| > | ||
| 500 | ||
| </h1> | ||
| <p style={{ fontSize: '1.25rem', fontWeight: 600, color: '#f8fafc', margin: '0 0 0.5rem' }}> | ||
| Something went wrong | ||
| </p> | ||
| <p style={{ color: '#94a3b8', maxWidth: '22rem', margin: '0 auto 2rem' }}> | ||
| An unexpected error occurred. Try again or contact support if the problem persists. | ||
| </p> | ||
| <div | ||
| style={{ display: 'flex', flexWrap: 'wrap', gap: '0.75rem', justifyContent: 'center' }} | ||
| > | ||
| <a | ||
| href="/dashboard" | ||
| style={{ | ||
| background: '#0f766e', | ||
| color: '#fff', | ||
| padding: '0.625rem 1.5rem', | ||
| borderRadius: '0.5rem', | ||
| fontWeight: 600, | ||
| textDecoration: 'none', | ||
| fontSize: '1rem', | ||
| }} | ||
| > | ||
| Back to dashboard | ||
| </a> | ||
| <a | ||
| href="mailto:hello@packratai.com" | ||
| style={{ | ||
| border: '1px solid #334155', | ||
| color: '#f8fafc', | ||
| padding: '0.625rem 1.5rem', | ||
| borderRadius: '0.5rem', | ||
| fontWeight: 600, | ||
| textDecoration: 'none', | ||
| fontSize: '1rem', | ||
| }} | ||
| > | ||
| Contact support | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /* | ||
| X-Frame-Options: DENY | ||
| X-Content-Type-Options: nosniff | ||
| Referrer-Policy: strict-origin-when-cross-origin | ||
| Permissions-Policy: camera=(), microphone=(), geolocation=() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", | ||
| "name": "packrat-admin", | ||
| "compatibility_date": "2024-09-23", | ||
| "assets": { | ||
| "directory": "./out", | ||
| "not_found_handling": "404-page" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /* | ||
| X-Frame-Options: DENY | ||
| X-Content-Type-Options: nosniff | ||
| Referrer-Policy: strict-origin-when-cross-origin | ||
| Permissions-Policy: camera=(), microphone=(), geolocation=() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", | ||
| "name": "packrat-guides", | ||
| "compatibility_date": "2024-09-23", | ||
| "assets": { | ||
| "directory": "./out", | ||
| "not_found_handling": "404-page" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /* | ||
| X-Frame-Options: DENY | ||
| X-Content-Type-Options: nosniff | ||
| Referrer-Policy: strict-origin-when-cross-origin | ||
| Permissions-Policy: camera=(), microphone=(), geolocation=() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This app now has both App Router (
app/not-found.tsx) and a Pages Routerpages/404.tsx. In this repo,pages/404.tsxis used in some apps specifically as a static export workaround (overriding Next’s internal_error). Consider adding a short file header comment explaining whypages/404.tsxexists here and how it relates toapp/not-found.tsxto avoid accidental deletion later.