feat: integrate vehicle selection dialog on login (refs #60)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 6m42s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 30s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

- Add useNeedsVehicleSelection and useVehicles hooks in App.tsx
- Show blocking VehicleSelectionDialog after auth gate ready
- Call downgrade API on confirm to save vehicle selections
- Invalidate queries after selection to proceed to app

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-01-24 11:31:26 -06:00
parent de7aa8c13c
commit b06a5e692b
2 changed files with 48 additions and 1 deletions

View File

@@ -3,7 +3,10 @@ import type { CheckoutRequest, PaymentMethodUpdateRequest, DowngradeRequest, Nee
export const subscriptionApi = {
getSubscription: () => apiClient.get('/subscriptions'),
needsVehicleSelection: () => apiClient.get<NeedsVehicleSelectionResponse>('/subscriptions/needs-vehicle-selection'),
needsVehicleSelection: async (): Promise<NeedsVehicleSelectionResponse> => {
const response = await apiClient.get<NeedsVehicleSelectionResponse>('/subscriptions/needs-vehicle-selection');
return response.data;
},
checkout: (data: CheckoutRequest) => apiClient.post('/subscriptions/checkout', data),
cancel: () => apiClient.post('/subscriptions/cancel'),
reactivate: () => apiClient.post('/subscriptions/reactivate'),