Changeset 07f4e8b for frontend/src/Components/Hooks/useGet.js
- Timestamp:
- 01/24/24 17:42:28 (8 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/Hooks/useGet.js
r5528b99 r07f4e8b 11 11 console.log(localStorage.getItem("sessionId")) 12 12 console.log("url od get " + uurl) 13 <<<<<<< HEAD14 13 await axios.get(uurl, {maxRedirects: 0}).then((res) => { 15 14 console.log(res); … … 23 22 // window.location.href = '/error' 24 23 }) 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)33 24 .finally(() => { 34 25 setIsLoading(false); … … 40 31 getData(url); 41 32 }, [dep, url, changed]); 42 33 43 34 return { 44 35 data,
Note:
See TracChangeset
for help on using the changeset viewer.