pull/5370/head
yann300 3 years ago
parent 1d70aef400
commit 2d8ff4baf7
  1. 6
      libs/remix-ui/terminal/src/lib/custom-hooks/useDragTerminal.tsx
  2. 5
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -26,7 +26,7 @@ export const useDragTerminal = (minHeight: number, defaultPosition: number) => {
}
const handleDraggingEnd = () => {
if(!isDragging) return
if (!isDragging) return
setIsDragging(false)
@ -38,7 +38,7 @@ export const useDragTerminal = (minHeight: number, defaultPosition: number) => {
event.preventDefault()
event.stopPropagation()
if(isOpen) {
if (isOpen) {
setLastTerminalPosition(terminalPosition)
setLastYPosition(0)
setTerminalPosition(minHeight)
@ -62,7 +62,7 @@ export const useDragTerminal = (minHeight: number, defaultPosition: number) => {
// Reset terminal position
useEffect(() => {
if(!terminalPosition){
if (!terminalPosition) {
setTerminalPosition(defaultPosition)
}
}, [terminalPosition, setTerminalPosition])

@ -95,7 +95,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
useEffect(() => {
event.trigger('resize', [terminalPosition])
} , [terminalPosition])
}, [terminalPosition])
const scrollToBottom = () => {
messagesEndRef.current.scrollIntoView({ behavior: 'smooth' })
@ -211,9 +211,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
}
}
const focusinput = () => {
inputEl.current.focus()
}

Loading…
Cancel
Save