feat: add needsVehicleSelection frontend hook (refs #60)
- Add NeedsVehicleSelectionResponse type - Add needsVehicleSelection API method - Add useNeedsVehicleSelection hook with staleTime: 0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,17 @@ export const useSubscription = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useNeedsVehicleSelection = () => {
|
||||
const { isAuthenticated, isLoading } = useAuth0();
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['needs-vehicle-selection'],
|
||||
queryFn: () => subscriptionApi.needsVehicleSelection(),
|
||||
enabled: isAuthenticated && !isLoading,
|
||||
staleTime: 0, // Always fetch fresh on login
|
||||
});
|
||||
};
|
||||
|
||||
export const useCheckout = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
|
||||
Reference in New Issue
Block a user