feat(18-05): add profile hooks and profile edit UI in settings

- Create usePublicProfile and useUpdateProfile hooks
- Create ProfileSection component with avatar upload, display name, bio
- Add Profile section to settings page (visible when authenticated)
This commit is contained in:
2026-04-05 13:17:31 +02:00
parent f7c9f3dc94
commit f120d179f7
3 changed files with 275 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import { createFileRoute, Link } from "@tanstack/react-router";
import { useRef, useState } from "react";
import { ProfileSection } from "../components/ProfileSection";
import {
useApiKeys,
useAuth,
@@ -280,7 +281,13 @@ function SettingsPage() {
<h1 className="text-xl font-semibold text-gray-900">Settings</h1>
</div>
<div className="bg-white rounded-xl border border-gray-100 p-5 space-y-6">
{auth?.user && (
<div className="bg-white rounded-xl border border-gray-100 p-5 space-y-6">
<ProfileSection />
</div>
)}
<div className="bg-white rounded-xl border border-gray-100 p-5 space-y-6 mt-4">
<div className="flex items-center justify-between">
<div>
<h3 className="text-sm font-medium text-gray-900">Weight Unit</h3>