generated from muhtadeetaron/nextjs-template
fix(api): fix api endpoint logic #3
This commit is contained in:
@ -20,7 +20,7 @@ const ProfilePage = () => {
|
||||
const token = await getToken();
|
||||
if (!token) return;
|
||||
|
||||
const response = await fetch(`${API_URL}/me`, {
|
||||
const response = await fetch(`${API_URL}/me/profile/`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
@ -79,7 +79,9 @@ const ProfilePage = () => {
|
||||
<div className="relative mx-10">
|
||||
<Avatar className="bg-[#113768] w-32 h-32 absolute -top-20 left-1/2 transform -translate-x-1/2">
|
||||
<AvatarFallback className="text-3xl text-white">
|
||||
{userData?.name ? userData.name.charAt(0).toUpperCase() : ""}
|
||||
{userData?.username
|
||||
? userData.username.charAt(0).toUpperCase()
|
||||
: ""}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user