fix: build error (#6480)
This commit is contained in:
parent
4f9f175f25
commit
48f872a68c
1 changed files with 4 additions and 3 deletions
|
|
@ -12,15 +12,16 @@ const Layout: FC = () => {
|
||||||
const { isCurrentWorkspaceDatasetOperator } = useAppContext()
|
const { isCurrentWorkspaceDatasetOperator } = useAppContext()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = `${t('tools.title')} - Dify`
|
if (typeof window !== 'undefined')
|
||||||
|
document.title = `${t('tools.title')} - Dify`
|
||||||
if (isCurrentWorkspaceDatasetOperator)
|
if (isCurrentWorkspaceDatasetOperator)
|
||||||
return router.replace('/datasets')
|
return router.replace('/datasets')
|
||||||
}, [])
|
}, [isCurrentWorkspaceDatasetOperator, router, t])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isCurrentWorkspaceDatasetOperator)
|
if (isCurrentWorkspaceDatasetOperator)
|
||||||
return router.replace('/datasets')
|
return router.replace('/datasets')
|
||||||
}, [isCurrentWorkspaceDatasetOperator])
|
}, [isCurrentWorkspaceDatasetOperator, router])
|
||||||
|
|
||||||
return <ToolProviderList />
|
return <ToolProviderList />
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue