1
1
import { getAllUser , getUser } from 'app/api/user' ;
2
- import React , { ChangeEvent , useContext , useEffect , useState } from 'react' ;
2
+ import { ChangeEvent , useContext , useEffect , useState } from 'react' ;
3
3
import { useNavigate , useParams } from 'react-router-dom' ;
4
- import { useQuery } from 'react-query' ;
5
4
import toast from 'react-hot-toast' ;
6
5
import {
7
- addOrg ,
8
- addOrgMembers ,
6
+
9
7
getAllOrgs ,
10
8
getOrg ,
11
9
updateOrg ,
@@ -18,7 +16,6 @@ import UserContext from 'app/context/user/userContext';
18
16
const EditWorkspace = ( ) => {
19
17
const navigate = useNavigate ( ) ;
20
18
const token = localStorage . getItem ( 'token' ) ;
21
- const userContext = useContext ( UserContext ) ;
22
19
const { spaceName } = useParams ( ) ;
23
20
24
21
const [ selectedFile , setSelectedFile ] = useState < File | null > ( null ) ;
@@ -27,8 +24,7 @@ const EditWorkspace = () => {
27
24
const [ validDescription , setValidDescription ] = useState < boolean > ( true ) ;
28
25
const [ validName , setValidName ] = useState < boolean > ( false ) ;
29
26
const [ uniqueName , setUniqueName ] = useState < boolean > ( false ) ;
30
- const [ members , setMembers ] = useState < string [ ] > ( [ ] ) ;
31
- const [ memberName , setMemberName ] = useState < string | null > ( null ) ;
27
+
32
28
33
29
const [ users , setUsers ] = useState < string [ ] > ( [ ] ) ;
34
30
const [ orgs , setOrgs ] = useState < string [ ] > ( [ ] ) ;
0 commit comments