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
7 changes: 4 additions & 3 deletions frontend/src/app/sessions/[id]/report/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Avatar } from '@/components/ui/avatar'
import { getAvatarName, getAvatarVariant } from '@/lib/avatarUtils'
import { GameOverallStats } from '@/components/statistics/GamePerformanceCharts'
import { Button } from '@/components/ui/button'
import { useRouter } from 'next/navigation'
import { useRouter, useSearchParams } from 'next/navigation'

interface PageProps {
params: Promise<{ id: string }>
Expand Down Expand Up @@ -95,6 +95,7 @@ function StudentReport({
export default function ReportPage({ params }: PageProps) {
const { id } = use(params)
const { session, clearSession } = useSessionContext()
const from = useSearchParams().get('from')
const { students: sessionStudents, isLoading } = useSessionStudentsForSession(id)

const router = useRouter()
Expand Down Expand Up @@ -148,8 +149,8 @@ export default function ReportPage({ params }: PageProps) {
<CurriculumLayout
title="Session Report"
subtitle={formattedDate}
backHref={`/sessions/${id}/curriculum`}
backLabel="Back to Curriculum"
backHref={`/sessions/${id}/rate/${from || sessionStudents[0].session_student_id}`}
backLabel="Back to Rating"
>
<div className="space-y-6 max-w-6xl mx-auto py-6">
{sessionStudents.map((sessionStudent) => (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/rate/RateStudent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default function RateStudent({
</Button>

<Link
href={`/sessions/${sessionId}/report`}
href={`/sessions/${sessionId}/report?from=${sessionStudentId}`}
className="flex items-center text-sm font-medium text-muted-foreground hover:text-primary transition-colors"
>
View Report <ChevronRight className="w-4 h-4 ml-1" />
Expand Down