Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/pages/class-detail/ClassNotFoundCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface ClassNotFoundCardProps {

export function ClassNotFoundCard({ onBack }: ClassNotFoundCardProps) {
return (
<div className="bg-surface-hover flex items-center justify-center">
<div className="flex min-h-screen items-center justify-center bg-surface-hover">
<div className="card-block p-8 text-center max-w-md">
<h2 className="text-xl font-semibold text-brand-dark mb-2">
Class Not Found
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/class-detail/LoadingSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export function LoadingSkeleton() {
<Skeleton className="h-8 w-32 mb-4" />
<Skeleton className="h-10 w-80 mb-3" />
<Skeleton className="h-5 w-48 mb-4" />
<div className="grid grid-cols-5 gap-4">
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4">
{Array.from({ length: 5 }).map((_, i) => (
<Skeleton key={i} className="h-20 rounded-lg" />
))}
</div>
</div>
</div>
<div className="max-w-7xl mx-auto px-6 py-6">
<div className="grid grid-cols-3 gap-6 mb-6">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-6">
{Array.from({ length: 3 }).map((_, i) => (
<Skeleton key={i} className="h-40 rounded-lg" />
))}
Expand Down
29 changes: 15 additions & 14 deletions frontend/src/pages/class-detail/SessionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,16 @@ export function SessionRow({

const getIcon = () => {
if (treatAsFrom)
return (
<CalendarClock className="size-5 text-gray-400 flex-shrink-0" />
);
return <CalendarClock className="size-5 text-gray-400 shrink-0" />;
if (treatAsTo)
return (
<CalendarClock className="size-5 text-blue-700 flex-shrink-0" />
);
return <CalendarClock className="size-5 text-blue-700 shrink-0" />;
if (isCancelled)
return (
<CalendarOff className="size-5 text-gray-500 flex-shrink-0" />
);
return <CalendarOff className="size-5 text-gray-500 shrink-0" />;
if (hasAttendance)
return <CheckCircle className="size-5 text-brand flex-shrink-0" />;
return <CheckCircle className="size-5 text-brand shrink-0" />;
if (isPast)
return (
<AlertCircle className="size-5 text-brand-gold flex-shrink-0" />
);
return <Calendar className="size-5 text-gray-400 flex-shrink-0" />;
return <AlertCircle className="size-5 text-brand-gold shrink-0" />;
return <Calendar className="size-5 text-gray-400 shrink-0" />;
};

const showCheckbox =
Expand All @@ -105,6 +97,15 @@ export function SessionRow({
return (
<div
onClick={onClick}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
onClick();
}
}}
className={`flex items-center justify-between p-4 rounded-lg border transition-colors cursor-pointer ${getBorderClass()}`}
>
<div className="flex items-center gap-4 min-w-0">
Expand Down
Loading