File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const controlPlaneApi = new ControlPlaneApi({
4848api . instance . interceptors . request . use ( exchangeTokenInterceptor ) ;
4949cloudApi . instance . interceptors . request . use ( exchangeTokenInterceptor ) ;
5050
51- export const LAST_TENANT_STORAGE_KEY = 'lastTenant ' ;
51+ export const CONTROL_PLANE_TENANT_STORAGE_KEY = 'controlPlaneLastTenant ' ;
5252
5353type StoredTenantLike = {
5454 metadata ?: {
@@ -58,7 +58,7 @@ type StoredTenantLike = {
5858
5959function readStoredTenantId ( ) : string | null {
6060 try {
61- const raw = localStorage . getItem ( LAST_TENANT_STORAGE_KEY ) ;
61+ const raw = localStorage . getItem ( CONTROL_PLANE_TENANT_STORAGE_KEY ) ;
6262 if ( ! raw ) {
6363 return null ;
6464 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import api, { TenantMember } from '@/lib/api';
77import {
88 controlPlaneApi ,
99 fetchControlPlaneStatus ,
10- LAST_TENANT_STORAGE_KEY ,
10+ CONTROL_PLANE_TENANT_STORAGE_KEY ,
1111} from '@/lib/api/api' ;
1212import { exchangeTokenQueryOptions } from '@/lib/api/exchange-token' ;
1313import queryClient from '@/query-client' ;
@@ -221,7 +221,10 @@ const tenantRoute = createRoute({
221221 await api . tenantGet ( params . tenant , { xTenantId : params . tenant } )
222222 ) . data ;
223223
224- localStorage . setItem ( LAST_TENANT_STORAGE_KEY , JSON . stringify ( fullTenant ) ) ;
224+ localStorage . setItem (
225+ CONTROL_PLANE_TENANT_STORAGE_KEY ,
226+ JSON . stringify ( fullTenant ) ,
227+ ) ;
225228
226229 // Populate the React Query cache so pages don't re-fetch immediately.
227230 queryClient . setQueryData ( [ 'tenant:get' , params . tenant ] , fullTenant ) ;
You can’t perform that action at this time.
0 commit comments