File tree Expand file tree Collapse file tree 2 files changed +10
-23
lines changed Expand file tree Collapse file tree 2 files changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ const getUser = async (
1717 if ( id ) {
1818 url = `${ API_BASE } /api/v1/user/${ id } ` ;
1919 }
20- console . log ( url ) ;
2120
2221 try {
2322 const response : AxiosResponse < UserData > = await axios ( url , getAxiosConfig ( ) ) ;
Original file line number Diff line number Diff line change @@ -39,28 +39,16 @@ export default function UserProfile(): React.ReactElement {
3939 const isProfile = ! id ;
4040
4141 useEffect ( ( ) => {
42- if ( id ) {
43- getUser (
44- setIsLoading ,
45- ( userData : UserData ) => {
46- setData ( userData ) ;
47- setGitAccount ( userData . gitAccount || '' ) ;
48- } ,
49- setAuth ,
50- setIsError ,
51- id ,
52- ) ;
53- } else {
54- getUser (
55- setIsLoading ,
56- ( userData : UserData ) => {
57- setData ( userData ) ;
58- setGitAccount ( userData . gitAccount || '' ) ;
59- } ,
60- setAuth ,
61- setIsError ,
62- ) ;
63- }
42+ getUser (
43+ setIsLoading ,
44+ ( userData : UserData ) => {
45+ setData ( userData ) ;
46+ setGitAccount ( userData . gitAccount || '' ) ;
47+ } ,
48+ setAuth ,
49+ setIsError ,
50+ id ,
51+ ) ;
6452 } , [ id ] ) ;
6553
6654 if ( isLoading ) return < div > Loading...</ div > ;
You can’t perform that action at this time.
0 commit comments