File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import styled from 'styled-components' ;
33import { bindActionCreators } from 'redux' ;
4- import { useDispatch } from 'react-redux' ;
4+ import { useDispatch , useSelector } from 'react-redux' ;
55import { remSize } from '../../theme' ;
66import IconButton from './IconButton' ;
77import { TerminalIcon } from '../../common/icons' ;
@@ -16,9 +16,10 @@ const BottomBarContent = styled.h2`
1616` ;
1717
1818export default ( ) => {
19- const { expandConsole } = bindActionCreators ( IDEActions , useDispatch ( ) ) ;
19+ const { expandConsole, collapseConsole } = bindActionCreators ( IDEActions , useDispatch ( ) ) ;
20+ const { consoleIsExpanded } = useSelector ( state => state . ide ) ;
2021
21- const actions = [ { icon : TerminalIcon , aria : 'Say Something' , action : expandConsole } ] ;
22+ const actions = [ { icon : TerminalIcon , aria : 'Say Something' , action : consoleIsExpanded ? collapseConsole : expandConsole } ] ;
2223
2324 return (
2425 < BottomBarContent >
You can’t perform that action at this time.
0 commit comments