diff options
author | 2021-03-07 00:46:47 +0300 | |
---|---|---|
committer | 2021-03-07 00:46:47 +0300 | |
commit | 9f04d5f5effd07534c9eb5b9f8886c8f970d0dc6 (patch) | |
tree | fdbc14712ccda7f93005530720e13b5ba8769644 /src/pages | |
parent | Set Username Expiry To Permanent (diff) |
Fixes Return Home Button Centering
Fixes the centering of the return home button on closed forms, by
removing the style wrapper.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/pages')
-rw-r--r-- | src/pages/FormPage.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index fa63282..8852ac5 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -96,12 +96,14 @@ class Navigation extends React.Component<NavigationProps> { let submit = null; if (this.props.form_state) { + let inner_submit; if (this.props.scopes.includes(OAuthScopes.Identify) && !checkScopes(this.props.scopes)) { // Render OAuth button if login is required, and the scopes needed are not available - submit = <OAuth2Button scopes={this.props.scopes} rerender={() => this.setState({"logged_in": true})}/>; + inner_submit = <OAuth2Button scopes={this.props.scopes} rerender={() => this.setState({"logged_in": true})}/>; } else { - submit = <button form="form" type="submit">Submit</button>; + inner_submit = <button form="form" type="submit">Submit</button>; } + submit = <div css={submitStyles}>{ inner_submit }</div>; } return ( @@ -110,7 +112,7 @@ class Navigation extends React.Component<NavigationProps> { <Link to="/" css={Navigation.returnStyles}>Return Home</Link> </div> <br css={this.separatorStyles}/> - <div css={submitStyles}>{ submit }</div> + { submit } </div> ); } |