feat(28-03): add profile navigation link and extend /me with createdAt
Adds Profile link to UserMenu dropdown (above Settings), extends /me endpoint to return user's createdAt for member-since display, and updates AuthState interface with optional createdAt field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,18 @@ export function UserMenu() {
|
||||
</button>
|
||||
{open && (
|
||||
<div className="absolute right-0 mt-1 w-40 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50">
|
||||
<Link
|
||||
to="/profile"
|
||||
onClick={() => setOpen(false)}
|
||||
className="flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors"
|
||||
>
|
||||
<LucideIcon
|
||||
name="circle-user"
|
||||
size={16}
|
||||
className="text-gray-400"
|
||||
/>
|
||||
Profile
|
||||
</Link>
|
||||
<Link
|
||||
to="/settings"
|
||||
onClick={() => setOpen(false)}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { apiDelete, apiGet, apiPost } from "../lib/api";
|
||||
|
||||
interface AuthState {
|
||||
user: { id: string; email?: string } | null;
|
||||
user: { id: string; email?: string; createdAt?: string } | null;
|
||||
authenticated: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user