diff --git a/src/components/charts/ActivityContributionChart.js b/src/components/charts/ActivityContributionChart.js index 782cba4..3a855bb 100644 --- a/src/components/charts/ActivityContributionChart.js +++ b/src/components/charts/ActivityContributionChart.js @@ -1,6 +1,5 @@ import React, { useState, useCallback } from 'react'; import { Tooltip } from 'primereact/tooltip'; -import { formatDateTime } from "@/utils/time"; import useWindowWidth from '@/hooks/useWindowWidth'; const ActivityContributionChart = ({ session }) => { @@ -159,7 +158,7 @@ const ActivityContributionChart = ({ session }) => { const weekDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; const getScaleClass = (width) => { - if (width <= 800) return 'scale-75 origin-top-left'; + if (width <= 800) return 'overflow-x-auto'; if (width <= 1000) return 'scale-95 origin-top-left'; return ''; }; @@ -172,68 +171,70 @@ const ActivityContributionChart = ({ session }) => { data-pr-tooltip="Total number of learning activities on the platform" /> -
-
-

- {totalActivities} learning activities in the last year -

-
-
- {/* Days of week labels */} -
- {weekDays.map((day, index) => ( -
- {index % 2 === 0 && day} +
+
+
+

+ {totalActivities} learning activities in the last year +

+
+
+ {/* Days of week labels */} +
+ {weekDays.map((day, index) => ( +
+ {index % 2 === 0 && day} +
+ ))} +
+
+ {/* Calendar grid */} +
+ {calendar[0].map((_, weekIndex) => ( +
+ {calendar.map((row, dayIndex) => ( + row[weekIndex] && ( +
0 + ? `${row[weekIndex].count} activit${row[weekIndex].count !== 1 ? 'ies' : 'y'}` + : 'No activities' + }`} + >
+ ) + ))} +
+ ))}
- ))} + {/* Month labels */} +
+ {getMonthLabels().map((month, index) => ( +
+ {month.name} +
+ ))} +
+
-
- {/* Calendar grid */} + {/* Legend */} +
+ Less
- {calendar[0].map((_, weekIndex) => ( -
- {calendar.map((row, dayIndex) => ( - row[weekIndex] && ( -
0 - ? `${row[weekIndex].count} activit${row[weekIndex].count !== 1 ? 'ies' : 'y'}` - : 'No activities' - }`} - >
- ) - ))} -
- ))} -
- {/* Month labels */} -
- {getMonthLabels().map((month, index) => ( -
- {month.name} -
- ))} +
+
+
+
+
+ More
- {/* Legend */} -
- Less -
-
-
-
-
-
-
- More -
); diff --git a/src/components/profile/UserBadges.js b/src/components/profile/UserBadges.js index 6a82984..5671c07 100644 --- a/src/components/profile/UserBadges.js +++ b/src/components/profile/UserBadges.js @@ -105,7 +105,7 @@ const UserBadges = ({ visible, onHide }) => {
) : badges.length === 0 ? (
- No badges earned yet. Complete courses to earn badges! + No badges earned yet. Get started on the Dev Journey to earn badges!
) : (
diff --git a/src/components/profile/progress/UserProgress.js b/src/components/profile/progress/UserProgress.js index c0324d3..2854dc2 100644 --- a/src/components/profile/progress/UserProgress.js +++ b/src/components/profile/progress/UserProgress.js @@ -193,9 +193,8 @@ const UserProgress = () => {

Dev Journey

- - + +

Track your progress through the courses, showcase your GitHub contributions, submit projects, and earn badges!

@@ -280,6 +279,13 @@ const UserProgress = () => { {subTask.status} + {subTask.status === 'Connect your GitHub account' && ( + <> + + + + )}
{subTask.status.includes('repository') && !subTask.completed && ( {
router.push(`/course/${task.courseNAddress}`)} - tooltip="View Course" - tooltipOptions={{ - position: "top" - }} outlined size="small" /> diff --git a/src/hooks/tracking/useTrackVideoLesson.js b/src/hooks/tracking/useTrackVideoLesson.js index 33a30ac..0f261a6 100644 --- a/src/hooks/tracking/useTrackVideoLesson.js +++ b/src/hooks/tracking/useTrackVideoLesson.js @@ -103,7 +103,7 @@ const useTrackVideoLesson = ({lessonId, videoDuration, courseId, videoPlayed, pa if (isAdmin) return; if (videoDuration && timeSpent >= Math.round(videoDuration * 0.8) && !completedRef.current) { - console.log('🎯 Video reached 90% threshold - Marking as completed'); + console.log('🎯 Video reached 80% threshold - Marking as completed'); markLessonAsCompleted(); } }, [timeSpent, videoDuration, markLessonAsCompleted, isAdmin]);