Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
chore: Prepare release 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Venkatesh committed Jan 16, 2020
1 parent 26ffcb2 commit a27dbe0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>io.tokern</groupId>
<artifactId>bastion</artifactId>
<version>0.1.7-SNAPSHOT</version>
<version>0.1.7</version>
<packaging>jar</packaging>

<name>Bastion</name>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tokern-front-end",
"version": "0.1.6",
"version": "0.1.7",
"private": true,
"proxy": "http://localhost:8080",
"dependencies": {
Expand Down
15 changes: 8 additions & 7 deletions src/frontend/src/users/UserList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, useCallback } from 'react';
import { connect } from 'unistore/react';
import Button from '../common/Button';
import DeleteConfirmButton from '../common/DeleteConfirmButton';
Expand All @@ -9,14 +9,15 @@ import Text from '../common/Text';
import fetchJson from '../utilities/fetch-json.js';
import EditUserForm from './EditUserForm';
import InviteUserForm from './InviteUserForm';
import apiCall from "../utilities/apiCall";

function UserList({ currentUser, token }) {
function UserList({ currentUser }) {
const [users, setUsers] = useState([]);
const [showAddUser, setShowAddUser] = useState(false);
const [editUser, setEditUser] = useState(null);

const loadUsersFromServer = async () => {
const json = await fetchJson('GET', '/api/users', undefined, token);
const loadUsersFromServer = useCallback(async () => {
const json = await apiCall('GET', '/api/users');
if (json.error) {
message.error(json.error);
}
Expand All @@ -27,12 +28,12 @@ function UserList({ currentUser, token }) {
});
setUsers(users);
}
};
}, []);

useEffect(() => {
document.title = 'Bastion - Users';
loadUsersFromServer();
}, []);
}, [loadUsersFromServer]);

const handleDelete = async user => {
const json = await fetchJson('DELETE', '/api/users/' + user._id);
Expand Down Expand Up @@ -128,4 +129,4 @@ function UserList({ currentUser, token }) {
);
}

export default connect(['currentUser', 'token'])(React.memo(UserList));
export default connect(['currentUser'])(React.memo(UserList));

0 comments on commit a27dbe0

Please sign in to comment.