We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parentsca0b510 +ac68ba0 commit6e08106Copy full SHA for 6e08106
web-app/src/containers/Tutorial/LevelPage/Level.tsx
@@ -82,8 +82,15 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
82
thrownewError('No Stage steps found')
83
}
84
85
+constpageBottomRef=React.useRef(null)
86
+
87
+constscrollToBottom=()=>{
88
+//@ts-ignore
89
+pageBottomRef.current.scrollIntoView({behavior:'smooth'})
90
+}
91
//@ts-ignore
92
constcurrentStep=level.steps.findIndex(s=>s.status==='ACTIVE')
93
+React.useEffect(scrollToBottom,[currentStep])
94
95
return(
96
<divcss={styles.page}>
@@ -113,6 +120,7 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
113
120
)
114
121
})}
115
122
</div>
123
+<divref={pageBottomRef}/>
116
124
117
125
118
126
{(testStatus||processes.length>0)&&(