Closed MorganBergen closed 1 month ago
something to do with
const saveProfile = async (updatedProfile) => {
try {
const userId = localStorage.getItem('userId'); // Retrieve user ID from localStorage
if (userId) {
const response = await axios.post(`/api/profile/${userId}`, updatedProfile);
setProfile(response.data);
}
} catch (error) {
console.error('Error saving profile:', error);
}