@@ -18,23 +18,20 @@ import ShardingError from './states/sharding-error';
1818import IncompleteShardingSetup from './states/incomplete-sharding-setup' ;
1919
2020const containerStyles = css ( {
21- paddingLeft : spacing [ 400 ] ,
22- paddingRight : spacing [ 400 ] ,
2321 display : 'flex' ,
2422 width : '100%' ,
25- height : '100%' ,
26- maxWidth : '700px' ,
27- } ) ;
28-
29- const workspaceContentStyles = css ( {
3023 paddingTop : spacing [ 400 ] ,
24+ paddingLeft : spacing [ 400 ] ,
25+ paddingRight : spacing [ 400 ] ,
26+ maxWidth : '700px' ,
3127} ) ;
3228
33- const centeredContent = css ( {
29+ const loaderStyles = css ( {
3430 display : 'flex' ,
31+ alignItems : 'flex-start' ,
3532 justifyContent : 'center' ,
36- alignItems : 'center ' ,
37- height : '100%' ,
33+ width : '100% ' ,
34+ marginTop : spacing [ 1800 ] * 2 ,
3835} ) ;
3936
4037type GlobalWritesProps = {
@@ -44,16 +41,8 @@ type GlobalWritesProps = {
4441function ShardingStateView ( {
4542 shardingStatus,
4643} : {
47- shardingStatus : ShardingStatus ;
44+ shardingStatus : Exclude < ShardingStatus , 'NOT_READY' > ;
4845} ) {
49- if ( shardingStatus === ShardingStatuses . NOT_READY ) {
50- return (
51- < div className = { centeredContent } >
52- < SpinLoaderWithLabel progressText = "Loading …" />
53- </ div >
54- ) ;
55- }
56-
5746 if (
5847 shardingStatus === ShardingStatuses . UNSHARDED ||
5948 shardingStatus === ShardingStatuses . SUBMITTING_FOR_SHARDING
@@ -105,14 +94,22 @@ function ShardingStateView({
10594}
10695
10796export function GlobalWrites ( { shardingStatus } : GlobalWritesProps ) {
97+ if ( shardingStatus === ShardingStatuses . NOT_READY ) {
98+ return (
99+ < div className = { loaderStyles } >
100+ < SpinLoaderWithLabel progressText = "Loading …" />
101+ </ div >
102+ ) ;
103+ }
104+
108105 return (
109- < div className = { containerStyles } >
110- < WorkspaceContainer className = { workspaceContentStyles } >
111- < ConfirmationModalArea >
106+ < WorkspaceContainer >
107+ < ConfirmationModalArea >
108+ < div className = { containerStyles } >
112109 < ShardingStateView shardingStatus = { shardingStatus } />
113- </ ConfirmationModalArea >
114- </ WorkspaceContainer >
115- </ div >
110+ </ div >
111+ </ ConfirmationModalArea >
112+ </ WorkspaceContainer >
116113 ) ;
117114}
118115export default connect ( ( state : RootState ) => ( {
0 commit comments