refactor: replace useQueryState with useState for category management in Apps component

This commit is contained in:
yyh 2025-12-26 11:54:10 +08:00
parent 4f672757c1
commit caea6c9b6e
No known key found for this signature in database

View File

@ -5,7 +5,6 @@ import type { App } from '@/models/explore'
import { RiRobot2Line } from '@remixicon/react'
import { useDebounceFn } from 'ahooks'
import { useRouter } from 'next/navigation'
import { useQueryState } from 'nuqs'
import * as React from 'react'
import { useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
@ -64,9 +63,7 @@ const Apps = ({
}
const [currentType, setCurrentType] = useState<AppModeEnum[]>([])
const [currCategory, setCurrCategory] = useQueryState('category', {
defaultValue: allCategoriesEn,
})
const [currCategory, setCurrCategory] = useState<AppCategories | string>(allCategoriesEn)
const {
data,