Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.vercel

47 changes: 46 additions & 1 deletion client/src/pages/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
? summaryQuery.data.recentActivity
: mockDashboardSummary.recentActivity;
const solvedRate = summaryQuery.data?.totalChallenges
? Math.round((summaryQuery.data.solved / summaryQuery.data.totalChallenges) * 100)
? Math.round(
(summaryQuery.data.solved / summaryQuery.data.totalChallenges) * 100,
)
: 0;

const stats = [
Expand Down Expand Up @@ -99,6 +101,7 @@
subtitle="Track progress, jump back into your latest work, and command the arena."
/>

{/* Featured Hero */}
<MotionBlock
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
Expand Down Expand Up @@ -258,6 +261,48 @@
</div>
</div>
</div>
{/* Pending Tasks Section Preview */}
<div className="mt-8 pt-8 border-t border-glass-border/20">
<div className="space-y-4">
<div className="flex items-center justify-between">
<h2 className="text-section-title font-semibold flex items-center gap-2">
<FiClock className="text-accent" />
Pending Tasks
<span className="text-xs bg-accent/10 px-2 py-0.5 rounded-full text-accent font-black tracking-widest">3</span>
</h2>
<Link to="/pending-tasks" className="text-xs text-accent font-bold hover:underline flex items-center gap-1">
View All <FiArrowRight />
</Link>
</div>

<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
{[
{ id: 'ch_001', title: 'Two Sum', category: 'Logic', priority: 'High', due: '2h' },
{ id: 'ch_002', title: 'Reverse Link', category: 'Data Struct', priority: 'Med', due: '1d' },
{ id: 'ch_003', title: 'Graph Traversal', category: 'Algorithms', priority: 'Low', due: '3d' },
].map((task) => (
<div key={task.id} onClick={() => navigate(`/challenge/${task.id}`)} className="group macos-glass p-5 hover:border-accent transition-all cursor-pointer bg-white/[0.02]">

Check failure on line 284 in client/src/pages/Dashboard.jsx

View workflow job for this annotation

GitHub Actions / client

'navigate' is not defined
<div className="flex justify-between items-start mb-4">
<span className="text-[10px] text-tertiary uppercase font-black tracking-widest">{task.category}</span>
<span className={`text-[8px] px-1.5 py-0.5 rounded uppercase font-black ${task.priority === 'High' ? 'bg-red-500/20 text-red-500' :
task.priority === 'Med' ? 'bg-yellow-500/20 text-yellow-500' : 'bg-blue-500/20 text-blue-400'
}`}>
{task.priority}
</span>
</div>
<h3 className="font-bold text-lg leading-tight group-hover:text-accent transition-colors mb-4">{task.title}</h3>
<div className="flex items-center justify-between mt-auto pt-4 border-t border-glass-border/40">
<div className="flex items-center gap-2">
<FiClock size={12} className="text-accent" />
<span className="text-[10px] text-secondary font-medium">Due {task.due}</span>
</div>
<button className="text-[10px] bg-accent/10 text-accent px-3 py-1 rounded-lg font-bold hover:bg-accent/20 transition-colors">Resume</button>
</div>
</div>
))}
</div>
</div>
</div>
</div>
);
};
Expand Down
Loading
Loading