From 514d9ffd8618ff0aea25125f6c17fc45247a5242 Mon Sep 17 00:00:00 2001 From: Lane Goodman Date: Wed, 18 Jan 2023 14:19:23 -0500 Subject: [PATCH] Consistent button sizes, page titles, form wrapper --- src/components/profile-form.js | 322 +++++++++++++------------- src/pages/organizations/[id]/index.js | 7 +- src/pages/teams/index.js | 4 +- 3 files changed, 167 insertions(+), 166 deletions(-) diff --git a/src/components/profile-form.js b/src/components/profile-form.js index 3b7ebfff..f4499062 100644 --- a/src/components/profile-form.js +++ b/src/components/profile-form.js @@ -230,174 +230,178 @@ export default class ProfileForm extends Component { return (
-

Edit your profile details

- { - const data = Object.keys(values).map((key) => ({ - key_id: key, - value: values[key], - })) - actions.setSubmitting(true) - try { - await setMyProfile(data) - actions.setSubmitting(false) - Router.push(returnUrl) - } catch (e) { - logger.error(e) - actions.setSubmitting(false) - actions.setStatus(e.message) - } - }} - render={({ status, isSubmitting }) => { - const addProfileText = `Submit ${isSubmitting ? ' 🕙' : ''}` - return ( -
- {orgAttributes.length > 0 ? ( - <> -

- Details for {orgName} -

- {orgAttributes.map((attribute) => { - return ( -
- - {attribute.key_type === 'gender' ? ( +
+

Edit your profile details

+ { + const data = Object.keys(values).map((key) => ({ + key_id: key, + value: values[key], + })) + actions.setSubmitting(true) + try { + await setMyProfile(data) + actions.setSubmitting(false) + Router.push(returnUrl) + } catch (e) { + logger.error(e) + actions.setSubmitting(false) + actions.setStatus(e.message) + } + }} + render={({ status, isSubmitting }) => { + const addProfileText = `Submit ${isSubmitting ? ' 🕙' : ''}` + return ( + + {orgAttributes.length > 0 ? ( + <> +

+ Details for {orgName} +

+ {orgAttributes.map((attribute) => { + return ( +
- ) : null} - {attribute.key_type === 'gender' ? ( - - ) : ( - <> - -
- -
- - )} -
- ) - })} - - ) : ( - '' - )} -

- Details for {teamName} -

- {memberAttributes.length > 0 - ? memberAttributes.map((attribute) => { - return ( -
- - {attribute.key_type === 'gender' ? ( +
+ ) + })} + + ) : ( + '' + )} +

+ Details for {teamName} +

+ {memberAttributes.length > 0 + ? memberAttributes.map((attribute) => { + return ( +
- ) : null} - {attribute.key_type === 'gender' ? ( - - ) : ( - <> - -
- -
- - )} -
- ) - }) - : 'No profile form to fill yet'} - {org && org.privacy_policy ? ( -
-

Privacy Policy

-
- {org.privacy_policy.body} + {attribute.key_type === 'gender' ? ( + + ) : null} + {attribute.key_type === 'gender' ? ( + + ) : ( + <> + +
+ +
+ + )} +
+ ) + }) + : 'No profile form to fill yet'} + {org && org.privacy_policy ? ( +
+

Privacy Policy

+
+ {org.privacy_policy.body} +
+
+ + this.setConsentChecked(e.target.checked) + } + /> + {org.privacy_policy.consentText} +
-
+ )} + {status && status.msg &&
{status.msg}
} +
+
+ {addProfileText} +
- ) : ( -
- )} - {status && status.msg &&
{status.msg}
} -
- -
- - ) - }} - /> + + ) + }} + /> +
) } diff --git a/src/pages/organizations/[id]/index.js b/src/pages/organizations/[id]/index.js index a013cc79..4fd42095 100644 --- a/src/pages/organizations/[id]/index.js +++ b/src/pages/organizations/[id]/index.js @@ -193,7 +193,7 @@ class Organization extends Component { Badges
) : ( diff --git a/src/pages/teams/index.js b/src/pages/teams/index.js index b04aac37..003c81a6 100644 --- a/src/pages/teams/index.js +++ b/src/pages/teams/index.js @@ -166,7 +166,7 @@ export default class TeamList extends Component { return ( ) @@ -185,7 +185,7 @@ export default class TeamList extends Component { const { searchOnMapMove } = this.state return (
-

Teams

+

Explore All Teams

{this.renderMap()}