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

This commit is contained in:
takatost
2024-07-05 21:31:34 +08:00
committed by GitHub
parent 71c50b7e20
commit 79df8825c8
46 changed files with 350 additions and 1028 deletions

View File

@@ -1,8 +1,7 @@
'use client'
// Libraries
import { useEffect, useRef, useState } from 'react'
import { useRouter } from 'next/navigation'
import { useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useDebounceFn } from 'ahooks'
import useSWR from 'swr'
@@ -23,12 +22,9 @@ import { fetchDatasetApiBaseUrl } from '@/service/datasets'
// Hooks
import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
import { useStore as useTagStore } from '@/app/components/base/tag-management/store'
import { useAppContext } from '@/context/app-context'
const Container = () => {
const { t } = useTranslation()
const router = useRouter()
const { currentWorkspace } = useAppContext()
const showTagManagementModal = useTagStore(s => s.showTagManagementModal)
const options = [
@@ -61,11 +57,6 @@ const Container = () => {
handleTagsUpdate()
}
useEffect(() => {
if (currentWorkspace.role === 'normal')
return router.replace('/apps')
}, [currentWorkspace])
return (
<div ref={containerRef} className='grow relative flex flex-col bg-gray-100 overflow-y-auto'>
<div className='sticky top-0 flex justify-between pt-4 px-12 pb-2 leading-[56px] bg-gray-100 z-10 flex-wrap gap-y-2'>