mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(frontend): use generated query key for waitlist cache invalidation
The hardcoded query key string didn't match the actual generated key, causing cache invalidation to fail after joining a waitlist. Now uses the generated getGetV2GetWaitlistIdsTheCurrentUserHasJoinedQueryKey() function for correct cache invalidation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { useSupabaseStore } from "@/lib/supabase/hooks/useSupabaseStore";
|
||||
import {
|
||||
useGetV2GetTheAgentWaitlist,
|
||||
useGetV2GetWaitlistIdsTheCurrentUserHasJoined,
|
||||
getGetV2GetWaitlistIdsTheCurrentUserHasJoinedQueryKey,
|
||||
} from "@/app/api/__generated__/endpoints/store/store";
|
||||
import type { StoreWaitlistEntry } from "@/app/api/__generated__/models/storeWaitlistEntry";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
@@ -49,7 +50,7 @@ export function useWaitlistSection() {
|
||||
function markAsJoined(_waitlistId: string) {
|
||||
// Invalidate the memberships query to refetch
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["getV2GetWaitlistIdsTheCurrentUserHasJoined"],
|
||||
queryKey: getGetV2GetWaitlistIdsTheCurrentUserHasJoinedQueryKey(),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user