We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bb4e31 commit 4f421efCopy full SHA for 4f421ef
1 file changed
apps/code/src/renderer/features/billing/stores/seatStore.ts
@@ -124,7 +124,11 @@ export const useSeatStore = create<SeatStore>()(
124
set({ isLoading: true, error: null, redirectUrl: null });
125
try {
126
const client = getClient();
127
- const seat = await client.getMySeat();
+ let seat = await client.getMySeat();
128
+ if (!seat) {
129
+ log.info("No seat found, auto-provisioning free plan");
130
+ seat = await client.createSeat(PLAN_FREE);
131
+ }
132
set({ seat, isLoading: false });
133
} catch (error) {
134
handleSeatError(error, set);
0 commit comments