Skip to content

Commit 09b4553

Browse files
committed
fix: remove fixedCacheKey from patchPlansByPidStatusMutation for cleaner implementation
1 parent c3cf6de commit 09b4553

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/pages/Plan/useSetDraftOnFailed.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export const useSetDraftOnFailed = () => {
1919
return params.get('payment') === 'failed' && !!planId;
2020
}, [location.search, planId]);
2121
const notFoundRoute = useLocalizeRoute('oops');
22-
const [patchStatus, { isLoading }] = usePatchPlansByPidStatusMutation({
23-
fixedCacheKey: 'shared-update-plan-status',
24-
});
22+
const [patchStatus, { isLoading }] = usePatchPlansByPidStatusMutation();
2523

2624
useEffect(() => {
2725
const run = () => {
@@ -33,7 +31,6 @@ export const useSetDraftOnFailed = () => {
3331
})
3432
.unwrap()
3533
.then(() => {
36-
// rimuovi il parametro senza mutare l'oggetto esistente
3734
setSearchParams((prev) => {
3835
const next = new URLSearchParams(prev);
3936
next.delete('payment');

0 commit comments

Comments
 (0)