diff --git a/Frontend/client/src/components/CreateGroup/creategroup.js b/Frontend/client/src/components/CreateGroup/creategroup.js
index 3ccbcfd..264d235 100644
--- a/Frontend/client/src/components/CreateGroup/creategroup.js
+++ b/Frontend/client/src/components/CreateGroup/creategroup.js
@@ -42,6 +42,7 @@ class creategroup extends Component {
selected: [],
UserId: localStorage.getItem('EmailId'),
// selectedUser:'',
+ memberSelect: [],
};
}
@@ -53,6 +54,20 @@ class creategroup extends Component {
// event.preventDefault();
// }
+ addMoreUsers = () => {
+ this.setState({
+ memberSelect: [...this.state.memberSelect,
+
+
,
+ ],
+ });
+ }
+
componentDidMount = async () => {
const email = localStorage.getItem('EmailId');
let userListRes = await axios.get(`http://localhost:3002/group/getAllUsersExceptCurrent/${email}`);
@@ -107,6 +122,9 @@ class creategroup extends Component {
GroupId: groupCreateRes.data.Groupdetails.GroupId,
UserIds: selUsers,
});
+ if (addusergrp.status === 200) {
+ window.location.href = '/dashboard';
+ }
}
} catch (err) {
alert(err);
@@ -115,11 +133,23 @@ class creategroup extends Component {
render() {
// console.log(this.state.selected);
+ let EmailId = localStorage.getItem('EmailId');
+ let redirectVar = null;
+ let currentURL = '';
+ if (EmailId === false || EmailId === undefined || EmailId === null) {
+ redirectVar = ;
+ } else {
+ EmailId = EmailId.charAt(0).toUpperCase() + EmailId.slice(1);
+ const urlstring = EmailId.replace('@', '%40');
+ currentURL = `https://splitwisebucket.s3.us-east-2.amazonaws.com/${urlstring}`;
+ console.log('Current User url', currentURL);
+ }
return (
+ {redirectVar}
-
+
Start a new group