re-add badges

This commit is contained in:
Olivier Gagnon
2021-09-16 21:49:38 -04:00
parent 757b38327f
commit 8e764a5524
2 changed files with 24 additions and 10 deletions
+12 -4
View File
@@ -60,15 +60,23 @@ export function TerminalRoot({ terminal, engine, player }: IProps): React.ReactE
return () => clearInterval(id);
}, []);
const hook = scrollHook.current;
if (hook !== null) {
setTimeout(() => hook.scrollIntoView(true), 50);
function doScroll(): void {
const hook = scrollHook.current;
if (hook !== null) {
setTimeout(() => hook.scrollIntoView(true), 50);
}
}
doScroll();
useEffect(() => {
setTimeout(doScroll, 50);
}, []);
const classes = useStyles();
return (
<>
<Box width="100%" minHeight="100vh" px={1} justifyContent={"flex-end"}>
<Box width="100%" minHeight="100vh" px={1} display={"flex"} alignItems={"flex-end"}>
<List classes={{ root: classes.list }}>
{terminal.outputHistory.map((item, i) => {
if (item instanceof Output)