Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/components/profile/UserProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use client";
"use client";

import { useState, useEffect } from 'react';
import { useAuth } from '@/context/AuthContext';
Expand Down Expand Up @@ -258,14 +258,16 @@ export default function UserProfile() {
{/* Profile Card */}
<div className="flex flex-col items-center lg:items-start text-center lg:text-left">
<div className="relative w-64 h-64 md:w-72 md:h-72 lg:w-full lg:h-auto lg:aspect-square mb-4 group">
<img
src={user.photoURL || `https://ui-avatars.com/api/?name=${user.name}&background=random`}
alt={user.name || 'User'}
className="w-full h-full object-cover rounded-full border-4 border-card shadow-xl"
/>
<div className="w-full h-full rounded-full overflow-hidden border-4 border-card shadow-xl">
<img
src={user.photoURL || `https://ui-avatars.com/api/?name=${user.name}&background=random`}
alt={user.name || 'User'}
className="w-full h-full object-cover"
/>
</div>
<button
onClick={() => setIsEditingPhoto(!isEditingPhoto)}
className="absolute bottom-4 right-4 p-2 bg-card text-foreground rounded-full border border-border shadow-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100"
className="absolute bottom-2 right-2 md:bottom-4 md:right-4 p-2 bg-card text-foreground rounded-full border border-border shadow-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100 z-10"
Comment thread
devpathindcommunity-india marked this conversation as resolved.
title="Change Avatar"
>
<Camera size={18} />
Expand Down