Skip to content

Commit e31d0aa

Browse files
committed
fix(revert): api/operation-set
1 parent dbe317b commit e31d0aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/apis/operation-set.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
CopilotSetStatus,
77
CopilotSetUpdateReq,
88
} from 'maa-copilot-client'
9-
import { useTranslation } from 'react-i18next'
109
import useSWR from 'swr'
1110
import useSWRInfinite from 'swr/infinite'
1211

@@ -100,12 +99,11 @@ export function useOperationSetSearch({
10099
disabled,
101100
...params
102101
}: UseOperationSetsParams) {
103-
const { t } = useTranslation()
104102
if (!suspense) {
105-
throw new Error(t('apis.operation_set.search_requires_suspense'))
103+
throw new Error('useOperationSetSearch must be used with suspense')
106104
}
107105
if (disabled) {
108-
throw new Error(t('apis.operation_set.search_cannot_be_disabled'))
106+
throw new Error('useOperationSetSearch cannot be disabled')
109107
}
110108

111109
let id: number | undefined

0 commit comments

Comments
 (0)