mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
refactor(hooks): rename provider to data for consistency with api response
This commit is contained in:
parent
46772b4f2a
commit
741bb94c8b
@ -11,7 +11,7 @@ export const useOcrProvider = (id: string) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const path: ConcreteApiPaths = `/ocr/providers/${id}`
|
||||
const { data: provider, loading, error } = useQuery(path, undefined)
|
||||
const { data, loading, error } = useQuery(path, undefined)
|
||||
const { mutate, loading: mutating } = useMutation('PATCH', path)
|
||||
|
||||
const updateConfig = useCallback(
|
||||
@ -26,7 +26,7 @@ export const useOcrProvider = (id: string) => {
|
||||
)
|
||||
|
||||
return {
|
||||
provider,
|
||||
provider: data?.data,
|
||||
loading,
|
||||
mutating,
|
||||
error,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user