File tree Expand file tree Collapse file tree
packages/platform/atoms/availability/wrappers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ type AvailabilitySettingsPlatformWrapperProps = {
4141 disableToasts ?: boolean ;
4242 isDryRun ?: boolean ;
4343 noScheduleChildren ?: ReactNode ;
44+ loadingStateChildren ?: ReactNode ;
4445} ;
4546
4647export const AvailabilitySettingsPlatformWrapper = ( {
@@ -59,6 +60,7 @@ export const AvailabilitySettingsPlatformWrapper = ({
5960 disableToasts,
6061 isDryRun = false ,
6162 noScheduleChildren,
63+ loadingStateChildren,
6264} : AvailabilitySettingsPlatformWrapperProps ) => {
6365 const { isLoading, data : schedule } = useSchedule ( id ) ;
6466 const { data : schedules } = useSchedules ( ) ;
@@ -123,7 +125,13 @@ export const AvailabilitySettingsPlatformWrapper = ({
123125 }
124126 } ;
125127
126- if ( isLoading ) return < div className = "px-10 py-4 text-xl" > Loading...</ div > ;
128+ if ( isLoading ) {
129+ return (
130+ < >
131+ { loadingStateChildren ? loadingStateChildren : < div className = "px-10 py-4 text-xl" > Loading...</ div > }
132+ </ >
133+ ) ;
134+ }
127135
128136 if ( ! atomSchedule ) {
129137 return noScheduleChildren ? (
You can’t perform that action at this time.
0 commit comments