feat: add react-hot-toast for notifications, enhance project detail page, and update task handling

- Added `react-hot-toast` dependency for improved notification handling.
- Introduced `MentorProjectsDetailPage` for detailed project and task views.
- Updated routing to include task-specific paths.
- Enhanced breadcrumb navigation to reflect new project structure.
- Refactored task handling in `MentorTaskCard` and `ProjectTimeline` components.
- Updated mock data to include detailed task submissions and deadlines.
- Improved UI elements for better user experience in project management.
This commit is contained in:
Kemas M. Aryadary Rasyad
2026-06-16 17:54:00 +07:00
parent f9bb21a961
commit ff68115fca
19 changed files with 317 additions and 182 deletions
@@ -1,17 +1,28 @@
import { useNavigate } from 'react-router-dom'
import { mockProjects } from '../../../../lib/mockData'
import { useState } from 'react';
import { Plus } from 'lucide-react';
import CreateProjectModal from './CreateProjectDialog';
const HomeMentorProject = () => {
const navigate = useNavigate();
const [isModalOpen, setIsModalOpen] = useState(false);
const openDialog = () => {
setIsModalOpen(true);
};
const closeDialog = () => {
setIsModalOpen(false);
};
return (
<div className='flex flex-col'>
<div className='flex flex-row justify-between mb-3 px-5 items-center'>
<h2 className="text-lg font-semibold text-gray-800 mb-4">Projects</h2>
<button className='bg-gray-300 px-2 py-1 rounded-xl font-bold hover:bg-gray-400'>
<span className='text-sm flex flex-row items-center gap-3'>
<Plus className='w-3 h-3'/>
Add
<button
className='bg-gray-300 p-1.5 rounded-lg font-bold hover:bg-gray-400'
onClick={openDialog} >
<span className='text-sm flex flex-row justify-between items-center gap-3.5'>
<Plus className='w-4 h-4' />
Add
</span>
</button>
</div>
@@ -20,7 +31,7 @@ const HomeMentorProject = () => {
return (
<div
key={index}
onClick={() => navigate(`/intern/projects/${project.id}`)}
onClick={() => navigate(`/intern/projects/${project.name}`)}
className="flex items-center gap-4 border border-gray-200 rounded-lg px-4 py-3 hover:bg-gray-50 cursor-pointer transition-colors duration-150"
>
<div className={`w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0 bg-gray-300`}>
@@ -32,6 +43,12 @@ const HomeMentorProject = () => {
)
})}
</div>
{isModalOpen && (
<CreateProjectModal
isOpen={isModalOpen}
onClose={closeDialog}
/>
)}
</div>
)
}