Skip to content

Commit dfd77d2

Browse files
j7-devclaude
andcommitted
fix(deps): 降回 @tanstack/react-query v4 並還原 v4 API
- package.json: ^5.100.6 → ^4.36.1(@refinedev/core@4.58 peer 要求 ^4.10.1) - 還原 13 處 isPending → isLoading(v4 useUpdate/useCustomMutation/useDeleteMany API) - 還原 lib/stories/index.tsx gcTime → cacheTime(v4 命名) - pnpm-lock.yaml 同步從 v5 chain 切回 v4 撤銷 9f90628 中錯誤升級為 v5 的部分。原始意圖為 v4,先前由 4.6 在 f0a9789 補依賴時誤裝 ^5.100.6,今回正之。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d05cce3 commit dfd77d2

15 files changed

Lines changed: 25 additions & 40 deletions

File tree

lib/main/components/editor/BlockNoteDrawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const BlockNoteDrawerComponent: FC<TBlockNoteDrawerProps> = ({
2525
}) => {
2626
const t = useLocale('EditorDrawer')
2727
const form = Form.useFormInstance()
28-
const { mutate: update, isPending: isLoading } = useUpdate({
28+
const { mutate: update, isLoading } = useUpdate({
2929
resource,
3030
dataProviderName,
3131
...notificationProps,

lib/main/components/editor/DescriptionDrawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const DescriptionDrawerComponent: FC<TDescriptionDrawerProps> = ({
3737
const t = useLocale('EditorDrawer')
3838
const { SITE_URL, ELEMENTOR_ENABLED } = useEnv()
3939
const form = Form.useFormInstance()
40-
const { mutate: update, isPending: isLoading } = useUpdate({
40+
const { mutate: update, isLoading } = useUpdate({
4141
resource,
4242
dataProviderName,
4343
...notificationProps,

lib/refine/bunny/MediaLibrary/Settings/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { Item } = Form
1212
const Settings = ({ url }: { url?: string }) => {
1313
const [form] = Form.useForm()
1414
const { handleSave, mutation } = useSave({ form, url })
15-
const { isPending: isSaveLoading } = mutation
15+
const { isLoading: isSaveLoading } = mutation
1616
const { isLoading: isGetLoading } = useOptions({ form })
1717
const t = useLocale('BunnyModule')
1818
return (

lib/refine/components/BindItems/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const BindItemsComponent = <
5757
})
5858

5959
const t = useLocale('BindItems')
60-
const { mutate, isPending: isLoading } = useCustomMutation()
60+
const { mutate, isLoading } = useCustomMutation()
6161
const apiUrl = useApiUrl()
6262
const invalidate = useInvalidate()
6363
const form = Form.useFormInstance<TLimit>()

lib/refine/components/GrantUsers/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const GrantUsersComponent = <
5858
const t = useLocale('GrantUsers')
5959
const [time, setTime] = useState<Dayjs | undefined>(undefined)
6060

61-
const { mutate, isPending: isLoading } = useCustomMutation()
61+
const { mutate, isLoading } = useCustomMutation()
6262
const apiUrl = useApiUrl()
6363
const invalidate = useInvalidate()
6464

lib/refine/components/RevokeUsers/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const RevokeUsersComponent = ({
4545
const invalidate = useInvalidate()
4646

4747
// remove student mutation
48-
const { mutate, isPending: isLoading } = useCustomMutation()
48+
const { mutate, isLoading } = useCustomMutation()
4949

5050
const handleRemove = () => {
5151
mutate(

lib/refine/components/UnbindItems/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const UnbindItemsComponent = ({
4848
const invalidate = useInvalidate()
4949

5050
// remove student mutation
51-
const { mutate, isPending: isLoading } = useCustomMutation()
51+
const { mutate, isLoading } = useCustomMutation()
5252

5353
const handleRemove = () => {
5454
mutate(

lib/refine/components/UpdateBoundItems/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const UpdateBoundItemsComponent = ({
4141
useInvalidateProp,
4242
}: TUpdateBoundItemsProps) => {
4343
const t = useLocale('UpdateBoundItems')
44-
const { mutate, isPending: isLoading } = useCustomMutation()
44+
const { mutate, isLoading } = useCustomMutation()
4545
const apiUrl = useApiUrl()
4646

4747
const invalidate = useInvalidate()

lib/refine/components/UpdateGrantedUsers/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const UpdateGrantedUsersComponent = ({
3939
}: TUpdateGrantedUsersProps) => {
4040
const t = useLocale('UpdateGrantedUsers')
4141
const [time, setTime] = useState<Dayjs | undefined>(undefined)
42-
const { mutate, isPending: isLoading } = useCustomMutation()
42+
const { mutate, isLoading } = useCustomMutation()
4343
const apiUrl = useApiUrl()
4444
const invalidate = useInvalidate()
4545

lib/stories/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const refineDecorator = (Story: any) => {
6161
refetchOnWindowFocus: false,
6262
retry: 0,
6363
staleTime: 1000 * 60 * 10,
64-
gcTime: 1000 * 60 * 10,
64+
cacheTime: 1000 * 60 * 10,
6565
},
6666
},
6767
})

0 commit comments

Comments
 (0)