mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 10:56:52 +08:00
Feat/use searchparams as state (#2554)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import Category from '@/app/components/explore/category'
|
||||
import AppCard from '@/app/components/explore/app-card'
|
||||
import { fetchAppDetail, fetchAppList } from '@/service/explore'
|
||||
import { createApp } from '@/service/apps'
|
||||
import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
|
||||
import CreateAppModal from '@/app/components/explore/create-app-modal'
|
||||
import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'
|
||||
import Loading from '@/app/components/base/loading'
|
||||
@@ -24,7 +25,9 @@ const Apps: FC = () => {
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
const router = useRouter()
|
||||
const { hasEditPermission } = useContext(ExploreContext)
|
||||
const [currCategory, setCurrCategory] = React.useState<AppCategory | ''>('')
|
||||
const [currCategory, setCurrCategory] = useTabSearchParams({
|
||||
defaultTab: '',
|
||||
})
|
||||
const [allList, setAllList] = React.useState<App[]>([])
|
||||
const [isLoaded, setIsLoaded] = React.useState(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user