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,11 +251,12 @@ 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 ]
254255 const color = isCurrent ? "primary" : "default"
255256 return < Stack key = { index } direction = { "row" } spacing = { 1 } alignItems = { "center" } >
256257 { index > 0 && < hr style = { { width : 100 } } /> }
257258 < Step active = { isCurrent } >
258- < Link to = { `/task/${ t . taskId } /${ currentStudentId } ` }
259+ < Link to = { `/task/${ lastTaskId } /${ currentStudentId } ` }
259260 style = { { color : "black" , textDecoration : "none" } } >
260261 < StepButton
261262 ref = { ref => {
@@ -343,7 +344,6 @@ const StudentSolutionsPage: FC = () => {
343344 { currentHomeworksGroup && taskIndexInHomework !== - 1 && currentHomeworksGroup . statsForHomeworks ! . length > 1 &&
344345 < Tabs
345346 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