Production-ready overhaul: backend fixes, claim flow polish, SEO, mobile, nginx
Backend: - Fix activity score (followersCount check), NIP-98 URL proto, wallet balance guard - Add payment_hash to confirm response, spentTodaySats to stats - Add idx_claims_ip_hash; security headers, graceful shutdown, periodic nonce cleanup Frontend: - Remove 8 legacy components; polish wizard (rules summary, profile card, confetti, share) - Stats budget bar uses spentTodaySats; ErrorBoundary with reload SEO & production: - Full meta/OG/Twitter, favicon, JSON-LD, robots.txt, sitemap.xml - Mobile CSS fixes; nginx static dist + gzip + cache + security headers - Vite manualChunks; aria-labels, dynamic page titles Made-with: Cursor
This commit is contained in:
@@ -23,18 +23,62 @@ export class ErrorBoundary extends Component<Props, State> {
|
||||
render() {
|
||||
if (this.state.hasError && this.state.error) {
|
||||
return (
|
||||
<div style={{ padding: "2rem", maxWidth: 900, margin: "0 auto", fontFamily: "Arial", color: "#333" }}>
|
||||
<h1 style={{ color: "#c0392b", marginBottom: "1rem" }}>Something went wrong</h1>
|
||||
<pre style={{ background: "#f7f7f7", padding: "1rem", overflow: "auto", fontSize: 13 }}>
|
||||
{this.state.error.message}
|
||||
</pre>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => this.setState({ hasError: false, error: null })}
|
||||
style={{ marginTop: "1rem", padding: "8px 16px", cursor: "pointer" }}
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
<div
|
||||
style={{
|
||||
minHeight: "100vh",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
padding: "2rem",
|
||||
fontFamily: "system-ui, -apple-system, sans-serif",
|
||||
background: "#0c1222",
|
||||
color: "#f1f5f9",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: "3rem", marginBottom: "1rem" }}>⚡</div>
|
||||
<h1 style={{ fontSize: "1.5rem", fontWeight: 600, marginBottom: "0.75rem" }}>
|
||||
Something went wrong
|
||||
</h1>
|
||||
<p style={{ color: "#94a3b8", maxWidth: 420, marginBottom: "1.5rem", lineHeight: 1.6 }}>
|
||||
The app encountered an unexpected error. This has been logged.
|
||||
You can try reloading the page.
|
||||
</p>
|
||||
<div style={{ display: "flex", gap: "12px" }}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => window.location.reload()}
|
||||
style={{
|
||||
padding: "10px 24px",
|
||||
background: "#f97316",
|
||||
color: "#fff",
|
||||
border: "none",
|
||||
borderRadius: "8px",
|
||||
fontSize: "14px",
|
||||
fontWeight: 500,
|
||||
cursor: "pointer",
|
||||
}}
|
||||
>
|
||||
Reload page
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => this.setState({ hasError: false, error: null })}
|
||||
style={{
|
||||
padding: "10px 24px",
|
||||
background: "transparent",
|
||||
color: "#94a3b8",
|
||||
border: "1px solid #334155",
|
||||
borderRadius: "8px",
|
||||
fontSize: "14px",
|
||||
fontWeight: 500,
|
||||
cursor: "pointer",
|
||||
}}
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user