feat: add breadcrumbs component and integrate with layout; update dependencies and refactor various pages

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-06-11 19:50:16 +07:00
parent eceb325836
commit b7489e3be7
27 changed files with 184 additions and 107 deletions
@@ -1,39 +1,17 @@
interface Task {
tanggal: string
title: string
description: string
}
interface TaskTimelineProps {
tasks?: Task[]
}
const defaultTasks: Task[] = [
{
tanggal: 'MAY 14, 2026 AT 23:59 PM',
title: 'Laporan tugas 1',
description: 'Berisi design uiux, dan user flow dari aplikasi internify',
},
{
tanggal: 'MAY 15, 2026 AT 23:59 PM',
title: 'Laporan tugas 1',
description: 'Berisi design uiux, dan user flow dari aplikasi internify',
},
{
tanggal: 'MAY 16, 2026 AT 23:59 PM',
title: 'Laporan tugas 1',
description: 'Berisi design uiux, dan user flow dari aplikasi internify',
},
]
import type { TaskTimelineProps } from "../../../../lib/mockDeadline"
import { defaultTasks } from "../../../../lib/mockDeadline"
const TaskTimeline = ({ tasks = defaultTasks }: TaskTimelineProps) => {
const today = new Date()
const today = new Date()
const isOverdue = (tanggal: string) => {
const deadline = new Date(tanggal)
return deadline < today
}
const upcomingIndex = tasks.findIndex(
task => new Date(task.tanggal) >= today
)
return (
<div>
<h2 className="text-base font-semibold text-gray-800 mb-5">Task Timeline</h2>
@@ -45,6 +23,7 @@ const TaskTimeline = ({ tasks = defaultTasks }: TaskTimelineProps) => {
<ul className="flex flex-col gap-5">
{tasks.map((task, index) => {
const overdue = isOverdue(task.tanggal)
const isRedDot = overdue || index === upcomingIndex
return (
<li key={index} className="flex gap-4 pl-0">
@@ -52,9 +31,9 @@ const TaskTimeline = ({ tasks = defaultTasks }: TaskTimelineProps) => {
<div className="relative flex-shrink-0 mt-1">
<span
className={`block w-3 h-3 rounded-full border-2 z-10 relative
${overdue
? 'bg-red-500 border-red-500'
: 'bg-white border-gray-300'
${isRedDot
? 'bg-red-800 '
: 'bg-gray-400'
}`}
/>
</div>