File tree Expand file tree Collapse file tree
packages/highperformer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,22 +327,8 @@ function MyUrlsTab() {
327327
328328function Home ( ) {
329329 const backendInfo = useAppStore ( ( s ) => s . backendInfo )
330+ const backendProbed = useAppStore ( ( s ) => s . backendProbed )
330331 const [ activeTab , setActiveTab ] = useState ( 'catalog' )
331- const [ backendProbed , setBackendProbed ] = useState ( false )
332-
333- useEffect ( ( ) => {
334- // Wait for probeBackend to finish before rendering layout
335- const check = ( ) => {
336- const { backendInfo } = useAppStore . getState ( )
337- // backendInfo is set (backend found) or authChecked is true (probe finished, no backend)
338- if ( backendInfo !== null || useAppStore . getState ( ) . authChecked ) {
339- setBackendProbed ( true )
340- }
341- }
342- check ( )
343- const unsub = useAppStore . subscribe ( check )
344- return unsub
345- } , [ ] )
346332
347333 if ( ! backendProbed ) {
348334 return (
Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ export interface AppState {
172172
173173 // Backend info (null = no backend detected)
174174 backendInfo : BackendInfo | null
175+ backendProbed : boolean
175176 probeBackend : ( ) => Promise < void >
176177
177178 // Auth
@@ -373,6 +374,7 @@ const useAppStore = create<AppState>((set, get) => ({
373374
374375 // UI toggles
375376 backendInfo : null ,
377+ backendProbed : false ,
376378 probeBackend : async ( ) => {
377379 try {
378380 const { api } = await import ( '../api' )
@@ -381,6 +383,7 @@ const useAppStore = create<AppState>((set, get) => ({
381383 } catch {
382384 // No backend available — frontend-only mode
383385 }
386+ set ( { backendProbed : true } )
384387 } ,
385388
386389 user : null ,
You can’t perform that action at this time.
0 commit comments