fix: icon setting can close and open right panel (#3295)
* fix: icon setting input box can close and open right panel * fix: unsued import
This commit is contained in:
parent
26be941e84
commit
be31e9315e
@ -1,6 +1,6 @@
|
||||
import { useState } from 'react'
|
||||
|
||||
import { Button, useMediaQuery } from '@janhq/joi'
|
||||
import { Button } from '@janhq/joi'
|
||||
import { useAtom, useAtomValue, useSetAtom } from 'jotai'
|
||||
import { SettingsIcon, ChevronUpIcon, Settings2Icon } from 'lucide-react'
|
||||
|
||||
@ -27,8 +27,6 @@ const ChatInput: React.FC<Props> = ({ sendMessage, stopInference }) => {
|
||||
const [activeSetting, setActiveSetting] = useState(false)
|
||||
const [showRightPanel, setShowRightPanel] = useAtom(showRightPanelAtom)
|
||||
|
||||
const matches = useMediaQuery('(max-width: 880px)')
|
||||
|
||||
return (
|
||||
<div className="relative p-4 pb-2">
|
||||
<div className="relative flex w-full flex-col">
|
||||
@ -72,11 +70,7 @@ const ChatInput: React.FC<Props> = ({ sendMessage, stopInference }) => {
|
||||
theme="icon"
|
||||
onClick={() => {
|
||||
setActiveTabThreadRightPanel('model')
|
||||
if (matches) {
|
||||
setShowRightPanel(!showRightPanel)
|
||||
} else if (!showRightPanel) {
|
||||
setShowRightPanel(true)
|
||||
}
|
||||
setShowRightPanel(!showRightPanel)
|
||||
}}
|
||||
>
|
||||
<Settings2Icon
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user