Improves the manipulation of the data to be outputed to file
This commit is contained in:
parent
7e35f03581
commit
6648b622be
@ -99,12 +99,8 @@ class UserOptions extends PureComponent {
|
||||
const mimeType = 'text/plain';
|
||||
|
||||
const userNamesObj = userListService.getUsers();
|
||||
let userNameListString = '';
|
||||
|
||||
Object.keys(userNamesObj).forEach((key) => {
|
||||
userNameListString += userNamesObj[key].name;
|
||||
userNameListString += '\n';
|
||||
});
|
||||
const userNameListString = Object.keys(userNamesObj)
|
||||
.map(key => userNamesObj[key].name, []).join('\r\n');
|
||||
link.setAttribute('download', `save-users-list-${Date.now()}.txt`);
|
||||
link.setAttribute(
|
||||
'href',
|
||||
|
Loading…
Reference in New Issue
Block a user