diff --git a/src/pages/Dashboard.jsx b/src/pages/Dashboard.jsx index 5afa7c5..8e0f087 100644 --- a/src/pages/Dashboard.jsx +++ b/src/pages/Dashboard.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { BookOpen, CheckSquare, Trophy, Sparkles, X } from 'lucide-react'; +import { BookOpen, CheckSquare, Trophy, Sparkles, X, HelpCircle } from 'lucide-react'; import { useApp } from '../store/AppContext'; import Card from '../components/ui/Card'; import Button from '../components/ui/Button'; @@ -97,11 +97,19 @@ const Dashboard = () => { setExplainerOpen(storage.get(explainerKey, false) !== true); }, [explainerKey]); - const dismissExplainer = () => { + const closeExplainer = () => { setExplainerOpen(false); if (explainerKey) storage.set(explainerKey, true); }; + const toggleExplainer = () => { + if (explainerOpen) { + closeExplainer(); + } else { + setExplainerOpen(true); + } + }; + const explainerSteps = [ { icon: BookOpen, title: 'Learn', text: 'Each week you get one topic from the knowledge base. Work through the learning session at your own pace.' }, { icon: CheckSquare, title: 'Test', text: 'Once your learning session is done, take the 5-question test to lock in what you learned and earn points.' }, @@ -111,21 +119,33 @@ const Dashboard = () => { return (
-
-

Welcome, {currentUser?.name}

-

- {curriculumActive - ? `Cycle ${currentCycle} · Week ${currWeek} of 26` - : `Here is your overview for week ${weekNumber}.`} -

+
+
+

Welcome, {currentUser?.name}

+

+ {curriculumActive + ? `Cycle ${currentCycle} · Week ${currWeek} of 26` + : `Here is your overview for week ${weekNumber}.`} +

+
+
- {/* Platform explainer — dismissible, per user */} + {/* Platform explainer — toggled via header help icon, per-user dismissed state */} {explainerOpen && (