-
Notifications
You must be signed in to change notification settings - Fork 38
claude/setup-admin-app-structure-eOiWV #2189
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
Changes from all commits
573da80
0068bcf
a827ec0
b3ba7fa
71dd106
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 | ||
| style={{ | ||
|
Comment on lines
+1
to
+6
|
||
| 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=() | ||
|
Comment on lines
+1
to
+5
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "https://developers.cloudflare.com/schemas/wrangler.json", | ||
| "name": "packrat-landing", | ||
| "compatibility_date": "2024-09-23", | ||
| "assets": { | ||
| "directory": "./out", | ||
| "not_found_handling": "404-page" | ||
| } | ||
| } |
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.
The admin 404 is now implemented in two places (
pages/404.tsxandapp/not-found.tsx) with different styling/markup. Withoutput: 'export'and Cloudflarenot_found_handling: "404-page", only one of these will become the deployed404.html, so this duplication can lead to inconsistent UX and future drift. Consider consolidating to a single source of truth (e.g., share a common component, or keep only the one that is actually used for the exported 404).