X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=resources%2Fjs%2Fcomponents%2Fusers%2FBox.js;h=bc4673ee9e12d818c209ced29906346bd3ff8f22;hb=9747af2d739c2e934aac05fc2c99703ee433aee1;hp=7bbc186eaacc54e4e934b8fdef82d2b71aa9b24d;hpb=21cc6fddc58d14a635cafa0add99a39fdbca0e9a;p=alttp.git
diff --git a/resources/js/components/users/Box.js b/resources/js/components/users/Box.js
index 7bbc186..bc4673e 100644
--- a/resources/js/components/users/Box.js
+++ b/resources/js/components/users/Box.js
@@ -1,29 +1,41 @@
import PropTypes from 'prop-types';
import React from 'react';
+import { Button } from 'react-bootstrap';
import { withTranslation } from 'react-i18next';
+import { useNavigate } from 'react-router-dom';
import { getAvatarUrl } from '../../helpers/User';
import i18n from '../../i18n';
-const Box = ({ discriminator, user }) => user ?
-
+const Box = ({ discriminator, user }) => {
+ const navigate = useNavigate();
+
+ if (!user) {
+ return {i18n.t('general.anonymous')};
+ }
+
+ return
-:
- {i18n.t('general.anonymous')}
-;
+ ;
+};
Box.propTypes = {
discriminator: PropTypes.bool,
user: PropTypes.shape({
discriminator: PropTypes.string,
+ id: PropTypes.string,
+ nickname: PropTypes.string,
username: PropTypes.string,
}),
};