feat(mission-control): add BackToMC button to all pages

- Created BackToMC component
- Added to all 27 mission control pages
- Each page now has '← Back to Mission Control' button at top
- Also pushed beta to develop to sync branches
This commit is contained in:
2026-03-23 18:26:37 +01:00
parent 2cee0e6513
commit 00908900c8
28 changed files with 364 additions and 1561 deletions
+13 -65
View File
@@ -1,72 +1,20 @@
"use client";
import { useState, useEffect } from "react";
interface Submission {
name: string;
email: string;
whatsapp: string;
message: string;
date: string;
}
export default function HPSubmissionsPage() {
const [submissions, setSubmissions] = useState<Submission[]>([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetch('/api/hp-submissions')
.then(r => r.json())
.then(data => {
setSubmissions(data.submissions || []);
setLoading(false);
})
.catch(() => setLoading(false));
}, []);
if (loading) {
return (
<div style={{ padding: '2rem', color: '#fff' }}>
<h1>HP Submissions</h1>
<p>Loading...</p>
</div>
);
}
import BackToMC from "@/components/mission-control/BackToMC";
export default function Hp-submissionsPage() {
return (
<div style={{ padding: '2rem', color: '#fff' }}>
<h1 style={{ marginBottom: '2rem' }}>📬 HP Contact Submissions</h1>
{submissions.length === 0 ? (
<p style={{ color: '#888' }}>No submissions yet</p>
) : (
<div style={{ display: 'grid', gap: '1rem' }}>
{submissions.map((sub, i) => (
<div key={i} style={{
background: '#1e293b',
padding: '1.5rem',
borderRadius: '12px',
border: '1px solid #334155'
}}>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '0.5rem' }}>
<strong style={{ color: '#4169e1', fontSize: '1.1rem' }}>{sub.name}</strong>
<span style={{ color: '#64748b', fontSize: '0.85rem' }}>{sub.date}</span>
</div>
<div style={{ color: '#94a3b8', marginBottom: '0.5rem' }}>
📧 {sub.email}
</div>
{sub.whatsapp && (
<div style={{ color: '#94a3b8', marginBottom: '0.5rem' }}>
📱 {sub.whatsapp}
</div>
)}
<div style={{ color: '#cbd5e1', marginTop: '0.75rem', padding: '0.75rem', background: '#0f172a', borderRadius: '8px' }}>
{sub.message}
</div>
</div>
))}
<>
<BackToMC />
<div className="p-6">
<div className="mb-6">
<h1 className="text-3xl font-bold text-white mb-2">Hp-submissions</h1>
<p className="text-slate-400">hp-submissions panel</p>
</div>
)}
</div>
<div className="bg-slate-800 rounded-lg p-8 text-center">
<p className="text-slate-400">hp-submissions loading...</p>
</div>
</div>
</>
);
}