Skip to content

Commit

Permalink
fix: build error (#6480)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola authored Jul 19, 2024
1 parent 4f9f175 commit 48f872a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/app/(commonLayout)/tools/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ const Layout: FC = () => {
const { isCurrentWorkspaceDatasetOperator } = useAppContext()

useEffect(() => {
document.title = `${t('tools.title')} - Dify`
if (typeof window !== 'undefined')
document.title = `${t('tools.title')} - Dify`
if (isCurrentWorkspaceDatasetOperator)
return router.replace('/datasets')
}, [])
}, [isCurrentWorkspaceDatasetOperator, router, t])

useEffect(() => {
if (isCurrentWorkspaceDatasetOperator)
return router.replace('/datasets')
}, [isCurrentWorkspaceDatasetOperator])
}, [isCurrentWorkspaceDatasetOperator, router])

return <ToolProviderList />
}
Expand Down

0 comments on commit 48f872a

Please sign in to comment.