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 1
1
import React from 'react' ;
2
2
import styled from 'styled-components' ;
3
3
import { bindActionCreators } from 'redux' ;
4
- import { useDispatch } from 'react-redux' ;
4
+ import { useDispatch , useSelector } from 'react-redux' ;
5
5
import { remSize } from '../../theme' ;
6
6
import IconButton from './IconButton' ;
7
7
import { TerminalIcon } from '../../common/icons' ;
@@ -16,9 +16,10 @@ const BottomBarContent = styled.h2`
16
16
` ;
17
17
18
18
export default ( ) => {
19
- const { expandConsole } = bindActionCreators ( IDEActions , useDispatch ( ) ) ;
19
+ const { expandConsole, collapseConsole } = bindActionCreators ( IDEActions , useDispatch ( ) ) ;
20
+ const { consoleIsExpanded } = useSelector ( state => state . ide ) ;
20
21
21
- const actions = [ { icon : TerminalIcon , aria : 'Say Something' , action : expandConsole } ] ;
22
+ const actions = [ { icon : TerminalIcon , aria : 'Say Something' , action : consoleIsExpanded ? collapseConsole : expandConsole } ] ;
22
23
23
24
return (
24
25
< BottomBarContent >
You can’t perform that action at this time.
0 commit comments