fix: hardcoded localhost → VITE_BACKEND_URL
This commit is contained in:
@@ -23,7 +23,7 @@ import React, {
|
|||||||
try {
|
try {
|
||||||
const decodedPayload = jwtDecode(jwtToken);
|
const decodedPayload = jwtDecode(jwtToken);
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
`http://localhost:3310/api/users/${decodedPayload.user}`
|
`${import.meta.env.VITE_BACKEND_URL}/api/users/${decodedPayload.user}`
|
||||||
);
|
);
|
||||||
setUser(res.data);
|
setUser(res.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user