Add user tag editing and improve member error display

- Display actual error message in member detail page instead of generic Member not found
- Add debug logging to user.get query to help diagnose issues
- Add expertise tags editing for users in profile settings page
- Update user.updateProfile mutation to accept expertiseTags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 13:45:34 +01:00
parent f59cfd393b
commit d7f0118940
3 changed files with 67 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ export default function MemberDetailPage() {
const router = useRouter()
const userId = params.id as string
const { data: user, isLoading, refetch } = trpc.user.get.useQuery({ id: userId })
const { data: user, isLoading, error, refetch } = trpc.user.get.useQuery({ id: userId })
const updateUser = trpc.user.update.useMutation()
const sendInvitation = trpc.user.sendInvitation.useMutation()
@@ -121,14 +121,19 @@ export default function MemberDetailPage() {
)
}
if (!user) {
if (error || !user) {
return (
<div className="space-y-6">
<Alert variant="destructive">
<AlertCircle className="h-4 w-4" />
<AlertTitle>Member not found</AlertTitle>
<AlertTitle>Error Loading Member</AlertTitle>
<AlertDescription>
The member you&apos;re looking for does not exist.
{error?.message || 'The member you\'re looking for does not exist.'}
{process.env.NODE_ENV === 'development' && (
<div className="mt-2 text-xs opacity-75">
User ID: {userId}
</div>
)}
</AlertDescription>
</Alert>
<Button asChild>