diff --git a/src/assets/scss/components/_user-profile.scss b/src/assets/scss/components/_user-profile.scss index ad229786..9bfd414c 100644 --- a/src/assets/scss/components/_user-profile.scss +++ b/src/assets/scss/components/_user-profile.scss @@ -134,6 +134,7 @@ text-align: left; font-family: $header-font-family; font-size: 1.2rem; + display: inline-block; @include media-breakpoint-up(md) { text-align: right; @@ -141,6 +142,8 @@ } &__status { + margin-right: 1rem; + &--confirmed { color: $default-green; } diff --git a/src/client/pages/UserPage/components/UserProfile.tsx b/src/client/pages/UserPage/components/UserProfile.tsx index c2e82100..bde8da5f 100644 --- a/src/client/pages/UserPage/components/UserProfile.tsx +++ b/src/client/pages/UserPage/components/UserProfile.tsx @@ -5,6 +5,8 @@ import React from 'react'; import { Field, reduxForm, InjectedFormProps, WrappedFieldProps } from 'redux-form'; import { CustomFieldProps } from '~/components/Fields'; import FileField from '~/components/FileField'; +import { generateQRCodeURL } from '@Shared/QRCodes'; +import FA from 'react-fontawesome'; export interface UserProfileFormData { gender: string; @@ -111,6 +113,24 @@ class UserProfile extends React.Component { ); } + /** + * Renders the QR code for the user if their status is "Confirmed". + * @param {Object} user The user to render for. + * @returns {Component} + */ + renderUserQRCode = (user: TESCUser) => { + if (user.status !== UserStatus.Confirmed) { + return ; + } + + return + + QR Code + ; + } + /** * Renders the bussing status for the current user. * @param {Object} user The current user to render for. @@ -349,15 +369,8 @@ class UserProfile extends React.Component {