Revert "feat: knowledge admin role" (#6018)

This commit is contained in:
takatost 2024-07-05 21:31:34 +08:00 • committed by GitHub
commit 79df8825c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 350 additions and 1028 deletions

View file

@ -1,7 +1,6 @@
'use client'
import type { FC } from 'react'
import React, { useEffect, useState } from 'react'
import { useRouter } from 'next/navigation'
import { useTranslation } from 'react-i18next'
import ExploreContext from '@/context/explore-context'
import Sidebar from '@/app/components/explore/sidebar'
@ -17,9 +16,8 @@ const Explore: FC<IExploreProps> = ({
children,
}) => {
const { t } = useTranslation()
const router = useRouter()
const [controlUpdateInstalledApps, setControlUpdateInstalledApps] = useState(0)
const { userProfile, isCurrentWorkspaceDatasetOperator } = useAppContext()
const { userProfile } = useAppContext()
const [hasEditPermission, setHasEditPermission] = useState(false)
const [installedApps, setInstalledApps] = useState<InstalledApp[]>([])
@ -34,11 +32,6 @@ const Explore: FC<IExploreProps> = ({
})()
}, [])
useEffect(() => {
if (isCurrentWorkspaceDatasetOperator)
return router.replace('/datasets')
}, [isCurrentWorkspaceDatasetOperator])
return (
<div className='flex h-full bg-gray-100 border-t border-gray-200 overflow-hidden'>
<ExploreContext.Provider