Feat/use searchparams as state (#2554)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
parent
ca69af7b97
commit
d93288f711
7 changed files with 58 additions and 9 deletions
|
|
@ -11,6 +11,7 @@ import { fetchAppList } from '@/service/apps'
|
|||
import { useAppContext } from '@/context/app-context'
|
||||
import { NEED_REFRESH_APP_LIST_KEY } from '@/config'
|
||||
import { CheckModal } from '@/hooks/use-pay'
|
||||
import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
|
||||
import TabSlider from '@/app/components/base/tab-slider'
|
||||
import { SearchLg } from '@/app/components/base/icons/src/vender/line/general'
|
||||
import { XCircle } from '@/app/components/base/icons/src/vender/solid/general'
|
||||
|
|
@ -35,7 +36,9 @@ const getKey = (
|
|||
const Apps = () => {
|
||||
const { t } = useTranslation()
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
const [activeTab, setActiveTab] = useState('all')
|
||||
const [activeTab, setActiveTab] = useTabSearchParams({
|
||||
defaultTab: 'all',
|
||||
})
|
||||
const [keywords, setKeywords] = useState('')
|
||||
const [searchKeywords, setSearchKeywords] = useState('')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue