Docs/Comments to DisplayUserProjects component
This commit is contained in:
		
							parent
							
								
									4212dae5bf
								
							
						
					
					
						commit
						aa5c4017bb
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -3,6 +3,10 @@ import { Project } from "../Types/goTypes"; | |||
| import { Link } from "react-router-dom"; | ||||
| import { api } from "../API/API"; | ||||
| 
 | ||||
| /** | ||||
|  * Renders a component that displays the projects a user is a part of and links to the projects start-page. | ||||
|  * @returns The JSX element representing the component. | ||||
|  */ | ||||
| function DisplayUserProject(): JSX.Element { | ||||
|   const [projects, setProjects] = useState<Project[]>([]); | ||||
| 
 | ||||
|  | @ -16,6 +20,7 @@ function DisplayUserProject(): JSX.Element { | |||
|       console.error(response.message); | ||||
|     } | ||||
|   }; | ||||
| 
 | ||||
|   // Call getProjects when the component mounts
 | ||||
|   useEffect(() => { | ||||
|     void getProjects(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Davenludd
						Davenludd