()
| 25 | |
| 26 | // Get All Your Project |
| 27 | const getUserProjects = async () => { |
| 28 | // API CALL - Fetch All User Projects |
| 29 | const response = await fetch(`${VITE_SERVER_PORT}/api/projects/fetchalluserprojects`, { |
| 30 | method: "GET", |
| 31 | headers: { |
| 32 | "Content-Type": "application/json", |
| 33 | "auth-token": localStorage.getItem('token') |
| 34 | } |
| 35 | }); |
| 36 | const json = await response.json(); |
| 37 | setUserProjects(json.reverse()); |
| 38 | } |
| 39 | |
| 40 | // Add a Project |
| 41 | const addProject = async (title, description, gitHubLink, youTubeLink) => { |