@contractspec/example.learning-journey-ui-coaching 3.7.6 → 3.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/AGENTS.md +50 -25
- package/README.md +63 -20
- package/dist/CoachingMiniApp.js +178 -178
- package/dist/browser/CoachingMiniApp.js +178 -178
- package/dist/browser/components/EngagementMeter.js +2 -2
- package/dist/browser/components/TipCard.js +3 -3
- package/dist/browser/components/TipFeed.js +6 -6
- package/dist/browser/components/index.js +11 -11
- package/dist/browser/index.js +179 -178
- package/dist/browser/views/Overview.js +16 -16
- package/dist/browser/views/Progress.js +10 -10
- package/dist/browser/views/Steps.js +6 -6
- package/dist/browser/views/Timeline.js +9 -9
- package/dist/browser/views/index.js +174 -174
- package/dist/components/EngagementMeter.js +2 -2
- package/dist/components/TipCard.js +3 -3
- package/dist/components/TipFeed.js +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +11 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +179 -178
- package/dist/node/CoachingMiniApp.js +178 -178
- package/dist/node/components/EngagementMeter.js +2 -2
- package/dist/node/components/TipCard.js +3 -3
- package/dist/node/components/TipFeed.js +6 -6
- package/dist/node/components/index.js +11 -11
- package/dist/node/index.js +179 -178
- package/dist/node/views/Overview.js +16 -16
- package/dist/node/views/Progress.js +10 -10
- package/dist/node/views/Steps.js +6 -6
- package/dist/node/views/Timeline.js +9 -9
- package/dist/node/views/index.js +174 -174
- package/dist/views/Overview.js +16 -16
- package/dist/views/Progress.js +10 -10
- package/dist/views/Steps.js +6 -6
- package/dist/views/Timeline.js +9 -9
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +174 -174
- package/package.json +10 -10
- package/src/CoachingMiniApp.tsx +70 -70
- package/src/components/EngagementMeter.tsx +82 -82
- package/src/components/TipCard.tsx +81 -81
- package/src/components/TipFeed.tsx +80 -80
- package/src/components/index.ts +1 -1
- package/src/docs/learning-journey-ui-coaching.docblock.ts +10 -10
- package/src/example.ts +25 -25
- package/src/index.ts +4 -6
- package/src/learning-journey-ui-coaching.feature.ts +12 -12
- package/src/views/Overview.tsx +136 -136
- package/src/views/Progress.tsx +146 -146
- package/src/views/Steps.tsx +57 -57
- package/src/views/Timeline.tsx +101 -101
- package/src/views/index.ts +1 -1
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -13
package/src/views/Progress.tsx
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
CardTitle,
|
|
8
|
-
} from '@contractspec/lib.ui-kit-web/ui/card';
|
|
9
|
-
import {
|
|
10
|
-
XpBar,
|
|
11
|
-
BadgeDisplay,
|
|
12
|
-
StreakCounter,
|
|
5
|
+
BadgeDisplay,
|
|
6
|
+
StreakCounter,
|
|
7
|
+
XpBar,
|
|
13
8
|
} from '@contractspec/example.learning-journey-ui-shared';
|
|
9
|
+
import {
|
|
10
|
+
Card,
|
|
11
|
+
CardContent,
|
|
12
|
+
CardHeader,
|
|
13
|
+
CardTitle,
|
|
14
|
+
} from '@contractspec/lib.ui-kit-web/ui/card';
|
|
14
15
|
import { EngagementMeter } from '../components/EngagementMeter';
|
|
15
|
-
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
16
16
|
|
|
17
17
|
export function ProgressView({ track, progress }: LearningViewProps) {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const totalXp =
|
|
19
|
+
track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const completedSteps = progress.completedStepIds.length;
|
|
22
|
+
const totalSteps = track.steps.length;
|
|
23
|
+
const pendingSteps = totalSteps - completedSteps;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
// For demo: split completed into "actioned" and "acknowledged"
|
|
26
|
+
// In real app, this would come from progress data
|
|
27
|
+
const actioned = Math.floor(completedSteps * 0.7);
|
|
28
|
+
const acknowledged = completedSteps - actioned;
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
return (
|
|
31
|
+
<div className="space-y-6">
|
|
32
|
+
{/* Engagement Overview */}
|
|
33
|
+
<Card>
|
|
34
|
+
<CardHeader>
|
|
35
|
+
<CardTitle className="flex items-center gap-2">
|
|
36
|
+
<span>📊</span>
|
|
37
|
+
<span>Engagement Overview</span>
|
|
38
|
+
</CardTitle>
|
|
39
|
+
</CardHeader>
|
|
40
|
+
<CardContent>
|
|
41
|
+
<EngagementMeter
|
|
42
|
+
actioned={actioned}
|
|
43
|
+
acknowledged={acknowledged}
|
|
44
|
+
pending={pendingSteps}
|
|
45
|
+
streak={progress.streakDays}
|
|
46
|
+
/>
|
|
47
|
+
</CardContent>
|
|
48
|
+
</Card>
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
{/* Stats Grid */}
|
|
51
|
+
<div className="grid gap-4 md:grid-cols-2">
|
|
52
|
+
<Card>
|
|
53
|
+
<CardHeader className="pb-2">
|
|
54
|
+
<CardTitle className="font-medium text-muted-foreground text-sm">
|
|
55
|
+
XP Earned
|
|
56
|
+
</CardTitle>
|
|
57
|
+
</CardHeader>
|
|
58
|
+
<CardContent className="space-y-3">
|
|
59
|
+
<div className="flex items-baseline gap-2">
|
|
60
|
+
<span className="font-bold text-3xl text-orange-500">
|
|
61
|
+
{progress.xpEarned}
|
|
62
|
+
</span>
|
|
63
|
+
<span className="text-muted-foreground">/ {totalXp} XP</span>
|
|
64
|
+
</div>
|
|
65
|
+
<XpBar
|
|
66
|
+
current={progress.xpEarned}
|
|
67
|
+
max={totalXp}
|
|
68
|
+
showLabel={false}
|
|
69
|
+
size="lg"
|
|
70
|
+
/>
|
|
71
|
+
</CardContent>
|
|
72
|
+
</Card>
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
<Card>
|
|
75
|
+
<CardHeader className="pb-2">
|
|
76
|
+
<CardTitle className="font-medium text-muted-foreground text-sm">
|
|
77
|
+
Engagement Streak
|
|
78
|
+
</CardTitle>
|
|
79
|
+
</CardHeader>
|
|
80
|
+
<CardContent>
|
|
81
|
+
<div className="flex items-center gap-4">
|
|
82
|
+
<StreakCounter days={progress.streakDays} size="lg" />
|
|
83
|
+
<div className="text-muted-foreground text-sm">
|
|
84
|
+
{progress.streakDays > 0
|
|
85
|
+
? 'Keep going!'
|
|
86
|
+
: 'Start your streak today!'}
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</CardContent>
|
|
90
|
+
</Card>
|
|
91
|
+
</div>
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
93
|
+
{/* Achievements */}
|
|
94
|
+
<Card>
|
|
95
|
+
<CardHeader>
|
|
96
|
+
<CardTitle className="flex items-center gap-2">
|
|
97
|
+
<span>🏅</span>
|
|
98
|
+
<span>Achievements</span>
|
|
99
|
+
</CardTitle>
|
|
100
|
+
</CardHeader>
|
|
101
|
+
<CardContent>
|
|
102
|
+
<BadgeDisplay badges={progress.badges} size="lg" maxVisible={10} />
|
|
103
|
+
{progress.badges.length === 0 && (
|
|
104
|
+
<p className="text-muted-foreground text-sm">
|
|
105
|
+
Action tips to unlock achievements!
|
|
106
|
+
</p>
|
|
107
|
+
)}
|
|
108
|
+
</CardContent>
|
|
109
|
+
</Card>
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
{/* Tip Breakdown */}
|
|
112
|
+
<Card>
|
|
113
|
+
<CardHeader>
|
|
114
|
+
<CardTitle className="flex items-center gap-2">
|
|
115
|
+
<span>💡</span>
|
|
116
|
+
<span>Tip Status</span>
|
|
117
|
+
</CardTitle>
|
|
118
|
+
</CardHeader>
|
|
119
|
+
<CardContent>
|
|
120
|
+
<div className="space-y-3">
|
|
121
|
+
{track.steps.map((step) => {
|
|
122
|
+
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
124
|
+
return (
|
|
125
|
+
<div
|
|
126
|
+
key={step.id}
|
|
127
|
+
className="flex items-center justify-between rounded-lg border p-3"
|
|
128
|
+
>
|
|
129
|
+
<div className="flex items-center gap-3">
|
|
130
|
+
<span
|
|
131
|
+
className={
|
|
132
|
+
isCompleted ? 'text-green-500' : 'text-amber-500'
|
|
133
|
+
}
|
|
134
|
+
>
|
|
135
|
+
{isCompleted ? '✓' : '○'}
|
|
136
|
+
</span>
|
|
137
|
+
<span
|
|
138
|
+
className={
|
|
139
|
+
isCompleted
|
|
140
|
+
? 'text-muted-foreground'
|
|
141
|
+
: 'text-foreground'
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
{step.title}
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
147
|
+
<span
|
|
148
|
+
className={`text-sm ${
|
|
149
|
+
isCompleted ? 'text-green-500' : 'text-muted-foreground'
|
|
150
|
+
}`}
|
|
151
|
+
>
|
|
152
|
+
{isCompleted ? 'Actioned' : 'Pending'}
|
|
153
|
+
</span>
|
|
154
|
+
</div>
|
|
155
|
+
);
|
|
156
|
+
})}
|
|
157
|
+
</div>
|
|
158
|
+
</CardContent>
|
|
159
|
+
</Card>
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
export { ProgressView as Progress };
|
package/src/views/Steps.tsx
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { TipCard } from '../components/TipCard';
|
|
4
3
|
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
4
|
+
import { TipCard } from '../components/TipCard';
|
|
5
5
|
|
|
6
6
|
export function Steps({ track, progress, onStepComplete }: LearningViewProps) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
7
|
+
const completedSteps = progress.completedStepIds.length;
|
|
8
|
+
const totalSteps = track.steps.length;
|
|
9
|
+
|
|
10
|
+
// Sort: pending first, then completed
|
|
11
|
+
const sortedSteps = [...track.steps].sort((a, b) => {
|
|
12
|
+
const aCompleted = progress.completedStepIds.includes(a.id);
|
|
13
|
+
const bCompleted = progress.completedStepIds.includes(b.id);
|
|
14
|
+
if (aCompleted === bCompleted) return 0;
|
|
15
|
+
return aCompleted ? 1 : -1;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const currentStepId = track.steps.find(
|
|
19
|
+
(s) => !progress.completedStepIds.includes(s.id)
|
|
20
|
+
)?.id;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className="space-y-6">
|
|
24
|
+
{/* Header */}
|
|
25
|
+
<div className="text-center">
|
|
26
|
+
<h2 className="font-bold text-xl">Coaching Tips</h2>
|
|
27
|
+
<p className="text-muted-foreground">
|
|
28
|
+
Review and take action on personalized tips
|
|
29
|
+
</p>
|
|
30
|
+
<p className="mt-2 text-muted-foreground text-sm">
|
|
31
|
+
{completedSteps} of {totalSteps} tips actioned
|
|
32
|
+
</p>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{/* Tips Stack */}
|
|
36
|
+
<div className="space-y-3">
|
|
37
|
+
{sortedSteps.map((step) => {
|
|
38
|
+
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
39
|
+
const isCurrent = step.id === currentStepId;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<TipCard
|
|
43
|
+
key={step.id}
|
|
44
|
+
step={step}
|
|
45
|
+
isCompleted={isCompleted}
|
|
46
|
+
isCurrent={isCurrent}
|
|
47
|
+
onComplete={() => onStepComplete?.(step.id)}
|
|
48
|
+
onDismiss={() => onStepComplete?.(step.id)} // Dismiss also completes
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
})}
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{/* All done */}
|
|
55
|
+
{completedSteps === totalSteps && (
|
|
56
|
+
<div className="text-center text-muted-foreground">
|
|
57
|
+
<span className="text-2xl">✨</span>
|
|
58
|
+
<p className="mt-2">All tips have been addressed!</p>
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
63
|
}
|
package/src/views/Timeline.tsx
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Card,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle,
|
|
8
9
|
} from '@contractspec/lib.ui-kit-web/ui/card';
|
|
9
10
|
import { TipFeed } from '../components/TipFeed';
|
|
10
|
-
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
11
11
|
|
|
12
12
|
export function Timeline({ track, progress }: LearningViewProps) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
// Create feed items sorted by completion status (completed first for "recent activity")
|
|
14
|
+
const feedItems = track.steps
|
|
15
|
+
.map((step) => ({
|
|
16
|
+
step,
|
|
17
|
+
isCompleted: progress.completedStepIds.includes(step.id),
|
|
18
|
+
completedAt: progress.completedStepIds.includes(step.id)
|
|
19
|
+
? 'Recently'
|
|
20
|
+
: undefined,
|
|
21
|
+
}))
|
|
22
|
+
.sort((a, b) => {
|
|
23
|
+
// Completed items first (as recent activity)
|
|
24
|
+
if (a.isCompleted && !b.isCompleted) return -1;
|
|
25
|
+
if (!a.isCompleted && b.isCompleted) return 1;
|
|
26
|
+
return 0;
|
|
27
|
+
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const completedCount = feedItems.filter((f) => f.isCompleted).length;
|
|
30
|
+
const pendingCount = feedItems.length - completedCount;
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
return (
|
|
33
|
+
<div className="space-y-6">
|
|
34
|
+
{/* Header */}
|
|
35
|
+
<div className="text-center">
|
|
36
|
+
<h2 className="font-bold text-xl">Activity Timeline</h2>
|
|
37
|
+
<p className="text-muted-foreground">
|
|
38
|
+
Your coaching journey and tip history
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
{/* Summary */}
|
|
43
|
+
<div className="grid grid-cols-2 gap-4">
|
|
44
|
+
<Card>
|
|
45
|
+
<CardContent className="p-4 text-center">
|
|
46
|
+
<div className="font-bold text-2xl text-green-500">
|
|
47
|
+
{completedCount}
|
|
48
|
+
</div>
|
|
49
|
+
<div className="text-muted-foreground text-sm">Tips Actioned</div>
|
|
50
|
+
</CardContent>
|
|
51
|
+
</Card>
|
|
52
|
+
<Card>
|
|
53
|
+
<CardContent className="p-4 text-center">
|
|
54
|
+
<div className="font-bold text-2xl text-amber-500">
|
|
55
|
+
{pendingCount}
|
|
56
|
+
</div>
|
|
57
|
+
<div className="text-muted-foreground text-sm">Tips Pending</div>
|
|
58
|
+
</CardContent>
|
|
59
|
+
</Card>
|
|
60
|
+
</div>
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
{/* Activity Feed */}
|
|
63
|
+
<Card>
|
|
64
|
+
<CardHeader>
|
|
65
|
+
<CardTitle className="flex items-center gap-2">
|
|
66
|
+
<span>📝</span>
|
|
67
|
+
<span>Coaching Feed</span>
|
|
68
|
+
</CardTitle>
|
|
69
|
+
</CardHeader>
|
|
70
|
+
<CardContent>
|
|
71
|
+
<TipFeed items={feedItems} />
|
|
72
|
+
</CardContent>
|
|
73
|
+
</Card>
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
75
|
+
{/* Journey Stats */}
|
|
76
|
+
<Card>
|
|
77
|
+
<CardHeader>
|
|
78
|
+
<CardTitle className="flex items-center gap-2">
|
|
79
|
+
<span>📈</span>
|
|
80
|
+
<span>Journey Stats</span>
|
|
81
|
+
</CardTitle>
|
|
82
|
+
</CardHeader>
|
|
83
|
+
<CardContent>
|
|
84
|
+
<div className="space-y-4">
|
|
85
|
+
<div className="flex items-center justify-between">
|
|
86
|
+
<span className="text-muted-foreground">Total Tips</span>
|
|
87
|
+
<span className="font-semibold">{track.steps.length}</span>
|
|
88
|
+
</div>
|
|
89
|
+
<div className="flex items-center justify-between">
|
|
90
|
+
<span className="text-muted-foreground">Completed</span>
|
|
91
|
+
<span className="font-semibold text-green-500">
|
|
92
|
+
{completedCount}
|
|
93
|
+
</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div className="flex items-center justify-between">
|
|
96
|
+
<span className="text-muted-foreground">XP Earned</span>
|
|
97
|
+
<span className="font-semibold text-orange-500">
|
|
98
|
+
{progress.xpEarned}
|
|
99
|
+
</span>
|
|
100
|
+
</div>
|
|
101
|
+
<div className="flex items-center justify-between">
|
|
102
|
+
<span className="text-muted-foreground">Current Streak</span>
|
|
103
|
+
<span className="font-semibold">
|
|
104
|
+
{progress.streakDays > 0
|
|
105
|
+
? `🔥 ${progress.streakDays} days`
|
|
106
|
+
: 'Start today!'}
|
|
107
|
+
</span>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</CardContent>
|
|
111
|
+
</Card>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
114
|
}
|