feat: enhance routing and UI components for intern and mentor sections

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-07-16 12:05:50 +07:00
parent 5689898f33
commit 99082efbdb
8 changed files with 90 additions and 57 deletions
@@ -23,12 +23,18 @@ export default function MentorProjectsPage() {
refetch();
};
const STATUS_ORDER: Record<string, number> = {
active: 0,
completed: 1,
archived: 2,
};
const renderContent = () => {
if (loading) {
return (
<div className="flex flex-row gap-3 w-full">
{[...Array(4)].map((_, i) => (
{[...Array(4)].map((_) => (
<MentorProjectCardSkeleton />
))}
</div>
@@ -48,7 +54,12 @@ export default function MentorProjectsPage() {
);
}
return projects.map(project => (
const sorted = [...projects].sort(
(a, b) =>
(STATUS_ORDER[a.status] ?? 99) - (STATUS_ORDER[b.status] ?? 99)
);
return sorted.map(project => (
<MentorProjectCard
key={project.id}
{...project}