Changeset 5528b99 for frontend/src/Components/Hooks/useGet.js
- Timestamp:
- 01/16/24 16:34:03 (9 months ago)
- Branches:
- master
- Children:
- 07f4e8b
- Parents:
- e6c2521
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/Hooks/useGet.js
re6c2521 r5528b99 11 11 console.log(localStorage.getItem("sessionId")) 12 12 console.log("url od get " + uurl) 13 <<<<<<< HEAD 13 14 await axios.get(uurl, {maxRedirects: 0}).then((res) => { 14 15 console.log(res); … … 22 23 // window.location.href = '/error' 23 24 }) 25 ======= 26 await axios. 27 get(uurl).then((res) => { 28 setData(res.data); 29 }).catch((err) => { 30 console.log(err) 31 }) 32 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) 24 33 .finally(() => { 25 34 setIsLoading(false); … … 31 40 getData(url); 32 41 }, [dep, url, changed]); 33 42 34 43 return { 35 44 data,
Note:
See TracChangeset
for help on using the changeset viewer.