{this.i18n('Your browser is not fully supported! Some parts of web may not work properly.')}
{this.i18n('We recommend using the latest version of ')}
diff --git a/js/components/user/UserRow.js b/js/components/user/UserRow.js
index 46b00ee6..9799061f 100644
--- a/js/components/user/UserRow.js
+++ b/js/components/user/UserRow.js
@@ -1,18 +1,17 @@
import React from "react";
-import {injectIntl} from "react-intl";
-import withI18n from "../../i18n/withI18n";
import {Button} from "react-bootstrap";
-import {LoaderSmall} from "../Loader";
import PropTypes from "prop-types";
import IfInternalAuth from "../misc/oidc/IfInternalAuth";
+import {useI18n} from "../../hooks/useI18n";
let UserRow = (props) => {
const user = props.user;
+ const {i18n} = useI18n();
return
{user.username}
@@ -20,11 +19,11 @@ let UserRow = (props) => {
{user.emailAddress}
-
-
+
+
;
@@ -34,8 +33,6 @@ UserRow.propTypes = {
user: PropTypes.object.isRequired,
onEdit: PropTypes.func.isRequired,
onDelete: PropTypes.func.isRequired,
- deletionLoading: PropTypes.bool.isRequired,
- i18n: PropTypes.func.isRequired,
};
-export default injectIntl(withI18n(UserRow));
+export default UserRow;
diff --git a/js/components/user/UserTable.js b/js/components/user/UserTable.js
index 2080e084..b8bddebe 100644
--- a/js/components/user/UserTable.js
+++ b/js/components/user/UserTable.js
@@ -1,20 +1,16 @@
-'use strict';
-
import React from "react";
import {Table} from "react-bootstrap";
import DeleteItemDialog from "../DeleteItemDialog";
import {injectIntl} from "react-intl";
import withI18n from "../../i18n/withI18n";
import UserRow from "./UserRow";
-import {ACTION_STATUS} from "../../constants/DefaultConstants";
import PropTypes from "prop-types";
import IfInternalAuth from "../misc/oidc/IfInternalAuth";
class UserTable extends React.Component {
static propTypes = {
users: PropTypes.array.isRequired,
- handlers: PropTypes.object.isRequired,
- userDeleted: PropTypes.object
+ handlers: PropTypes.object.isRequired
};
constructor(props) {
@@ -77,13 +73,11 @@ class UserTable extends React.Component {
}
_renderUsers() {
- const {users, userDeleted} = this.props;
+ const {users} = this.props;
const onEdit = this.props.handlers.onEdit;
let rows = [];
for (let i = 0, len = users.length; i < len; i++) {
- rows.push();
+ rows.push();
}
return rows;
}
diff --git a/js/components/user/Users.js b/js/components/user/Users.js
index c2f72df8..29cdb6c4 100644
--- a/js/components/user/Users.js
+++ b/js/components/user/Users.js
@@ -1,64 +1,33 @@
-'use strict';
-
import React from 'react';
import {Button, Card} from 'react-bootstrap';
-import {injectIntl} from "react-intl";
-import withI18n from '../../i18n/withI18n';
import UserTable from './UserTable';
-import {ACTION_STATUS, ALERT_TYPES} from "../../constants/DefaultConstants";
-import AlertMessage from "../AlertMessage";
-import {LoaderCard, LoaderSmall} from "../Loader";
import PropTypes from "prop-types";
import IfInternalAuth from "../misc/oidc/IfInternalAuth";
+import PromiseTrackingMask from "../misc/PromiseTrackingMask";
+import {useI18n} from "../../hooks/useI18n";
-class Users extends React.Component {
- static propTypes = {
- usersLoaded: PropTypes.object,
- handlers: PropTypes.object.isRequired,
- userDeleted: PropTypes.object,
- showAlert: PropTypes.bool.isRequired,
- };
-
- constructor(props) {
- super(props);
- this.i18n = this.props.i18n;
- }
-
- render() {
- const {usersLoaded, showAlert, userDeleted} = this.props;
- if (!usersLoaded.users && (!usersLoaded.status || usersLoaded.status === ACTION_STATUS.PENDING)) {
- return ;
- } else if (usersLoaded.status === ACTION_STATUS.ERROR) {
- return
- }
- return
-
- {this.i18n('users.panel-title')}
- {this.props.usersLoaded.status === ACTION_STATUS.PENDING && }
-
-
-
-
-