File tree Expand file tree Collapse file tree
packages/react-ui/src/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { LoadingSpinner } from '@openops/components/ui' ;
21import { useEffect , useState } from 'react' ;
2+
3+ import { FullPageSpinner } from './common/components/full-page-spinner' ;
34import { QueryKeys } from './constants/query-keys' ;
45import { flagsApi , FlagsMap } from './lib/flags-api' ;
56import { initializeInternal } from './lib/initialize-internal' ;
@@ -51,11 +52,7 @@ export function AppBootstrap({ children }: Readonly<AppBootstrapProps>) {
5152 } , [ ] ) ;
5253
5354 if ( state . status === 'loading' ) {
54- return (
55- < div className = "flex h-screen w-screen items-center justify-center" >
56- < LoadingSpinner size = { 50 } />
57- </ div >
58- ) ;
55+ return < FullPageSpinner /> ;
5956 }
6057
6158 if ( state . status === 'error' ) {
Original file line number Diff line number Diff line change 1+ import { LoadingSpinner } from '@openops/components/ui' ;
2+
3+ type FullPageSpinnerProps = {
4+ size ?: number ;
5+ } ;
6+
7+ export const FullPageSpinner = ( { size = 50 } : FullPageSpinnerProps ) => (
8+ < div className = "bg-background flex h-screen w-screen items-center justify-center" >
9+ < LoadingSpinner size = { size } />
10+ </ div >
11+ ) ;
Original file line number Diff line number Diff line change 1- import { LoadingSpinner } from '@openops/components/ui' ;
21import dayjs from 'dayjs' ;
32import { jwtDecode } from 'jwt-decode' ;
43import { Suspense , useEffect } from 'react' ;
54import { Navigate , useLocation , useNavigate } from 'react-router-dom' ;
65
76import { getFederatedUrlBasedOnFlags } from '@/app/common/auth/lib/utils' ;
7+ import { FullPageSpinner } from '@/app/common/components/full-page-spinner' ;
88import { flagsHooks } from '@/app/common/hooks/flags-hooks' ;
99import { platformHooks } from '@/app/common/hooks/platform-hooks' ;
1010import { projectHooks } from '@/app/common/hooks/project-hooks' ;
@@ -46,13 +46,7 @@ const LoggedIn = ({ children }: { children: React.ReactNode }) => {
4646 appConnectionsHooks . useConnectionsMetadata ( ) ;
4747
4848 return (
49- < Suspense
50- fallback = {
51- < div className = " flex h-screen w-screen items-center justify-center " >
52- < LoadingSpinner size = { 50 } > </ LoadingSpinner >
53- </ div >
54- }
55- >
49+ < Suspense fallback = { < FullPageSpinner /> } >
5650 < SocketProvider > { children } </ SocketProvider >
5751 </ Suspense >
5852 ) ;
Original file line number Diff line number Diff line change 1- import { LoadingSpinner } from '@openops/components/ui' ;
21import { Suspense , useEffect , useState } from 'react' ;
32
3+ import { FullPageSpinner } from '@/app/common/components/full-page-spinner' ;
44import { flagsHooks } from '@/app/common/hooks/flags-hooks' ;
55import {
66 setupRequestInterceptor ,
@@ -32,22 +32,8 @@ export const InitialDataGuard = ({
3232 } , [ flags ] ) ;
3333
3434 if ( ! interceptorsReady ) {
35- return (
36- < div className = "bg-background flex h-screen w-screen items-center justify-center " >
37- < LoadingSpinner size = { 50 } > </ LoadingSpinner >
38- </ div >
39- ) ;
35+ return < FullPageSpinner /> ;
4036 }
4137
42- return (
43- < Suspense
44- fallback = {
45- < div className = "bg-background flex h-screen w-screen items-center justify-center " >
46- < LoadingSpinner size = { 50 } > </ LoadingSpinner >
47- </ div >
48- }
49- >
50- { children }
51- </ Suspense >
52- ) ;
38+ return < Suspense fallback = { < FullPageSpinner /> } > { children } </ Suspense > ;
5339} ;
Original file line number Diff line number Diff line change 1- import { FlowDetailsPanel } from '@/app/features/flows/components/flow-details-panel' ;
2- import { LoadingSpinner } from '@openops/components/ui' ;
31import { PopulatedFlow } from '@openops/shared' ;
42import { useQuery } from '@tanstack/react-query' ;
53import { useEffect } from 'react' ;
64import { Navigate , useParams , useSearchParams } from 'react-router-dom' ;
75
6+ import { FullPageSpinner } from '@/app/common/components/full-page-spinner' ;
87import { QueryKeys } from '@/app/constants/query-keys' ;
98import { SEARCH_PARAMS } from '@/app/constants/search-params' ;
109import { BuilderPage } from '@/app/features/builder' ;
1110import { BuilderHeader } from '@/app/features/builder/builder-header/builder-header' ;
1211import { BuilderPublishButton } from '@/app/features/builder/builder-header/builder-publish-button' ;
1312import { BuilderStateProvider } from '@/app/features/builder/builder-state-provider' ;
13+ import { FlowDetailsPanel } from '@/app/features/flows/components/flow-details-panel' ;
1414import { flowsApi } from '@/app/features/flows/lib/flows-api' ;
1515import { AxiosError } from 'axios' ;
1616
@@ -59,11 +59,7 @@ const FlowBuilderPage = () => {
5959 }
6060
6161 if ( isLoading ) {
62- return (
63- < div className = "bg-background flex h-screen w-screen items-center justify-center " >
64- < LoadingSpinner size = { 50 } > </ LoadingSpinner >
65- </ div >
66- ) ;
62+ return < FullPageSpinner /> ;
6763 }
6864
6965 return (
Original file line number Diff line number Diff line change 1- import { LoadingSpinner } from '@openops/components/ui' ;
21import { useQuery } from '@tanstack/react-query' ;
32import { useParams } from 'react-router-dom' ;
43
4+ import { FullPageSpinner } from '@/app/common/components/full-page-spinner' ;
55import { QueryKeys } from '@/app/constants/query-keys' ;
66import { BuilderPage } from '@/app/features/builder' ;
77import { BuilderHeader } from '@/app/features/builder/builder-header/builder-header' ;
@@ -38,11 +38,7 @@ const FlowRunPage = () => {
3838 } ) ;
3939
4040 if ( isLoading ) {
41- return (
42- < div className = "bg-background flex h-screen w-screen items-center justify-center " >
43- < LoadingSpinner size = { 50 } > </ LoadingSpinner >
44- </ div >
45- ) ;
41+ return < FullPageSpinner /> ;
4642 }
4743
4844 return (
You can’t perform that action at this time.
0 commit comments