@@ -15,7 +15,7 @@ limitations under the License.
1515*/
1616
1717import { createClient } from 'matrix-js-sdk/src/matrix' ;
18- import React , { ReactNode } from 'react' ;
18+ import React , { Fragment , ReactNode } from 'react' ;
1919import { MatrixClient } from "matrix-js-sdk/src/client" ;
2020import classNames from "classnames" ;
2121import { logger } from "matrix-js-sdk/src/logger" ;
@@ -36,6 +36,8 @@ import AuthBody from "../../views/auth/AuthBody";
3636import AuthHeader from "../../views/auth/AuthHeader" ;
3737import InteractiveAuth from "../InteractiveAuth" ;
3838import Spinner from "../../views/elements/Spinner" ;
39+ import { AuthHeaderDisplay } from './header/AuthHeaderDisplay' ;
40+ import { AuthHeaderProvider } from './header/AuthHeaderProvider' ;
3941
4042interface IProps {
4143 serverConfig : ValidatedServerConfig ;
@@ -619,28 +621,37 @@ export default class Registration extends React.Component<IProps, IState> {
619621 { regDoneText }
620622 </ div > ;
621623 } else {
622- body = < div >
623- < h2 > { _t ( 'Create account' ) } </ h2 >
624- { errorText }
625- { serverDeadSection }
626- < ServerPicker
627- title = { _t ( "Host account on" ) }
628- dialogTitle = { _t ( "Decide where your account is hosted" ) }
629- serverConfig = { this . props . serverConfig }
630- onServerConfigChange = { this . state . doingUIAuth ? undefined : this . props . onServerConfigChange }
631- />
632- { this . renderRegisterComponent ( ) }
633- { goBack }
634- { signIn }
635- </ div > ;
624+ body = < Fragment >
625+ < div className = "mx_Register_mainContent" >
626+ < AuthHeaderDisplay
627+ title = { _t ( 'Create account' ) }
628+ serverPicker = { < ServerPicker
629+ title = { _t ( "Host account on" ) }
630+ dialogTitle = { _t ( "Decide where your account is hosted" ) }
631+ serverConfig = { this . props . serverConfig }
632+ onServerConfigChange = { this . state . doingUIAuth ? undefined : this . props . onServerConfigChange }
633+ /> }
634+ >
635+ { errorText }
636+ { serverDeadSection }
637+ </ AuthHeaderDisplay >
638+ { this . renderRegisterComponent ( ) }
639+ </ div >
640+ < div className = "mx_Register_footerActions" >
641+ { goBack }
642+ { signIn }
643+ </ div >
644+ </ Fragment > ;
636645 }
637646
638647 return (
639648 < AuthPage >
640649 < AuthHeader />
641- < AuthBody >
642- { body }
643- </ AuthBody >
650+ < AuthHeaderProvider >
651+ < AuthBody flex >
652+ { body }
653+ </ AuthBody >
654+ </ AuthHeaderProvider >
644655 </ AuthPage >
645656 ) ;
646657 }
0 commit comments