feat: add chapter index badge to ActivityChapterDropdown for improved navigation

This commit is contained in:
swve 2025-07-09 15:56:20 +02:00
parent 71cc8ef105
commit 7ef7f9feee

View file

@ -93,11 +93,13 @@ export default function ActivityChapterDropdown(props: ActivityChapterDropdownPr
</div> </div>
<div className="py-0.5"> <div className="py-0.5">
{props.course.chapters.map((chapter: any) => ( {props.course.chapters.map((chapter: any, index: number) => (
<div key={chapter.id} className="mb-1"> <div key={chapter.id} className="mb-1">
<div className="px-3 py-1.5 text-sm font-medium text-gray-600 bg-gray-50 border-y border-gray-100 flex items-center"> <div className="px-3 py-1.5 text-sm font-medium text-gray-600 bg-gray-50 border-y border-gray-100 flex items-center">
<div className="flex items-center space-x-1.5"> <div className="flex items-center space-x-1.5">
<Folder size={14} className="text-gray-400" /> <div className="bg-gray-500 text-white text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center">
{index + 1}
</div>
<span>{chapter.name}</span> <span>{chapter.name}</span>
</div> </div>
</div> </div>