fix(api): fix api endpoint logic #3

This commit is contained in:
shafin-r
2025-08-17 14:08:17 +06:00
parent ad46bf954e
commit 4f23f357e6
7 changed files with 87 additions and 69 deletions

View File

@ -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>