From: Daniel Karbach Date: Wed, 16 Mar 2022 15:38:33 +0000 (+0100) Subject: don't plaster everything with discriminators X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=21cc6fddc58d14a635cafa0add99a39fdbca0e9a;p=alttp.git don't plaster everything with discriminators --- diff --git a/resources/js/components/users/Box.js b/resources/js/components/users/Box.js index 139e6f6..7bbc186 100644 --- a/resources/js/components/users/Box.js +++ b/resources/js/components/users/Box.js @@ -5,20 +5,23 @@ import { withTranslation } from 'react-i18next'; import { getAvatarUrl } from '../../helpers/User'; import i18n from '../../i18n'; -const Box = ({ user }) => user ? +const Box = ({ discriminator, user }) => user ? {user.username} - - {'#'} - {user.discriminator} - + {discriminator ? + + {'#'} + {user.discriminator} + + : null} : {i18n.t('general.anonymous')} ; Box.propTypes = { + discriminator: PropTypes.bool, user: PropTypes.shape({ discriminator: PropTypes.string, username: PropTypes.string, diff --git a/resources/sass/results.scss b/resources/sass/results.scss index c5a7ce6..1bde555 100644 --- a/resources/sass/results.scss +++ b/resources/sass/results.scss @@ -8,6 +8,7 @@ justify-content: space-between; margin-top: 1ex; padding: 0.5em; + min-width: 15ex; border-radius: 1ex; background: $dark; color: $light;