ui: remove mock confessions in frontend and add empty state placeholder card
This commit is contained in:
@@ -861,29 +861,7 @@ export const QUESTIONS_DATA: Question[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// ─── Confessions ─────────────────────────────────────────────────────────────
|
// ─── Confessions ─────────────────────────────────────────────────────────────
|
||||||
export const CONFESSIONS_DATA: Confession[] = [
|
export const CONFESSIONS_DATA: Confession[] = [];
|
||||||
{
|
|
||||||
id: '1',
|
|
||||||
content: 'I was so nervous on my first day that I went to the wrong department. A senior helped me out and became my best friend. RIT has such a warm community! 🧡',
|
|
||||||
createdAt: '2025-07-19T11:00:00Z',
|
|
||||||
reactions: 87,
|
|
||||||
category: 'Wholesome',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '2',
|
|
||||||
content: 'The library WiFi is actually faster than my home connection. No complaints from me 😂',
|
|
||||||
createdAt: '2025-07-18T15:30:00Z',
|
|
||||||
reactions: 134,
|
|
||||||
category: 'Funny',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3',
|
|
||||||
content: 'I have a crush on someone in my class but I\'m too shy to talk. We have been in the same group project for 2 months now 😅',
|
|
||||||
createdAt: '2025-07-17T09:00:00Z',
|
|
||||||
reactions: 212,
|
|
||||||
category: 'Crush',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// ─── Toolkit Items ───────────────────────────────────────────────────────────
|
// ─── Toolkit Items ───────────────────────────────────────────────────────────
|
||||||
export const TOOLKIT_ITEMS: ToolkitItem[] = [
|
export const TOOLKIT_ITEMS: ToolkitItem[] = [
|
||||||
|
|||||||
@@ -765,6 +765,7 @@ export default function Community() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Confessions Feed */}
|
{/* Confessions Feed */}
|
||||||
|
{CONFESSIONS_DATA.length > 0 ? (
|
||||||
<StaggerContainer className="flex flex-col gap-4">
|
<StaggerContainer className="flex flex-col gap-4">
|
||||||
{CONFESSIONS_DATA.map((conf) => (
|
{CONFESSIONS_DATA.map((conf) => (
|
||||||
<StaggerItem key={conf.id}>
|
<StaggerItem key={conf.id}>
|
||||||
@@ -785,12 +786,12 @@ export default function Community() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{conf.category && (
|
{conf.category && (
|
||||||
<span className="px-2 py-0.5 rounded text-[10px] font-semibold bg-slate-55 text-slate-650 border border-slate-200/40" style={{ fontFamily: 'Poppins, sans-serif' }}>
|
<span className="px-2 py-0.5 rounded text-[10px] font-semibold bg-slate-50 text-slate-600 border border-slate-200/40" style={{ fontFamily: 'Poppins, sans-serif' }}>
|
||||||
{conf.category}
|
{conf.category}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-[13px] text-slate-750 leading-relaxed mb-4" style={{ fontFamily: 'Inter, sans-serif' }}>{conf.content}</p>
|
<p className="text-[13px] text-slate-755 leading-relaxed mb-4" style={{ fontFamily: 'Inter, sans-serif' }}>{conf.content}</p>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<button
|
<button
|
||||||
onClick={() => toggleLike(conf.id)}
|
onClick={() => toggleLike(conf.id)}
|
||||||
@@ -811,6 +812,17 @@ export default function Community() {
|
|||||||
</StaggerItem>
|
</StaggerItem>
|
||||||
))}
|
))}
|
||||||
</StaggerContainer>
|
</StaggerContainer>
|
||||||
|
) : (
|
||||||
|
<div className="bg-white rounded-2xl border border-[#E5E7EB] p-8 text-center" style={{ boxShadow: '0 2px 15px -3px rgba(0,0,0,0.07)' }}>
|
||||||
|
<Shield className="w-8 h-8 text-slate-300 mx-auto mb-3" />
|
||||||
|
<p className="text-sm font-semibold text-slate-700 mb-1" style={{ fontFamily: 'Poppins, sans-serif' }}>
|
||||||
|
No Confessions Yet
|
||||||
|
</p>
|
||||||
|
<p className="text-xs text-slate-400" style={{ fontFamily: 'Inter, sans-serif' }}>
|
||||||
|
Be the first to post a confession anonymously!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sidebar */}
|
{/* Sidebar */}
|
||||||
|
|||||||
Reference in New Issue
Block a user