fix(web): remove StatusPanel's internal useStore to fix context issues (#28348)
This commit is contained in:
@@ -5,7 +5,6 @@ import cn from '@/utils/classnames'
|
||||
import Indicator from '@/app/components/header/indicator'
|
||||
import StatusContainer from '@/app/components/workflow/run/status-container'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import { useStore } from '../store'
|
||||
|
||||
type ResultProps = {
|
||||
status: string
|
||||
@@ -13,6 +12,7 @@ type ResultProps = {
|
||||
tokens?: number
|
||||
error?: string
|
||||
exceptionCounts?: number
|
||||
isListening?: boolean
|
||||
}
|
||||
|
||||
const StatusPanel: FC<ResultProps> = ({
|
||||
@@ -21,10 +21,10 @@ const StatusPanel: FC<ResultProps> = ({
|
||||
tokens,
|
||||
error,
|
||||
exceptionCounts,
|
||||
isListening = false,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const docLink = useDocLink()
|
||||
const isListening = useStore(s => s.isListening)
|
||||
|
||||
return (
|
||||
<StatusContainer status={status}>
|
||||
|
||||
Reference in New Issue
Block a user