React - CurrentUser's Data not work
Hello
I changed UserModel in _models.ts File To
export interface UserModel {
Username: string
FirstName: string
Surname: string
ImagePath: string
PersonalEmail: string
PersonalPhone: string
UserType: string
} and i add Console.log in HeaderUserMenu.tsx File like this:
console.log("From HeaderUserMenu.tsx File to view "currentUser" Object")
console.log(currentUser)
console.log("From HeaderUserMenu.tsx File to view "currentUser.FirstName" value in object")
console.log(currentUser?.FirstName) The results in console:
<img src=" />
in CurrentUser there is a [[Prototype]] object
and the data from currentUser.FirstName object is undefined
Replies (2)
The problem has been resolved
I changed the first letter of each property in the UserModel to a lowercase letter
Now the data is displayed without any error

Hi,
Glad to hear you have already figurated this out.
The user model has to be customized based on your server's response structure, if your server returns the user object with camel-cased property names then on client model properties should be named in camel case as well.
Regards,
Lauris Stepanovs,
Keenthemes Support Team