File tree Expand file tree Collapse file tree
hwproj.front/src/components/Solutions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,12 +251,11 @@ const StudentSolutionsPage: FC = () => {
251251 style = { { overflowY : "hidden" , overflowX : "auto" , minHeight : 80 } } >
252252 { taskSolutionsStats ! . map ( ( t , index ) => {
253253 const isCurrent = versionsOfCurrentTask . includes ( t . taskId ! )
254- const lastTaskId = versionsOfCurrentTask [ versionsOfCurrentTask . length - 1 ]
255254 const color = isCurrent ? "primary" : "default"
256255 return < Stack key = { index } direction = { "row" } spacing = { 1 } alignItems = { "center" } >
257256 { index > 0 && < hr style = { { width : 100 } } /> }
258257 < Step active = { isCurrent } >
259- < Link to = { `/task/${ lastTaskId } /${ currentStudentId } ` }
258+ < Link to = { `/task/${ t . taskId } /${ currentStudentId } ` }
260259 style = { { color : "black" , textDecoration : "none" } } >
261260 < StepButton
262261 ref = { ref => {
@@ -344,6 +343,7 @@ const StudentSolutionsPage: FC = () => {
344343 { currentHomeworksGroup && taskIndexInHomework !== - 1 && currentHomeworksGroup . statsForHomeworks ! . length > 1 &&
345344 < Tabs
346345 onChange = { ( _ , value ) => navigate ( `/task/${ currentHomeworksGroup ! . statsForHomeworks ! [ value ] . statsForTasks ! [ taskIndexInHomework ] ! . taskId ! } /${ currentStudentId } ` ) }
346+ defaultValue = { currentHomeworksGroup ! . statsForHomeworks ! . length - 1 }
347347 variant = "scrollable"
348348 scrollButtons = { "auto" }
349349 value = { versionOfTask }
You can’t perform that action at this time.
0 commit comments