Update AppRouter.jsx
This commit is contained in:
parent
a0fab78f56
commit
b0a22fc8c5
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ const AppRouter = () => {
|
|||
|
||||
const fetchAPI = async () => {
|
||||
const location = window.location;
|
||||
const uri = `${location?.protocol}//192.168.0.105:5172/api`;
|
||||
const uri = `${location?.protocol}//${location.hostname}/api`;
|
||||
const response = await axios.get(uri);
|
||||
console.log(response.data.fruits);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue