diff --git a/dashboard/src/lib/api.ts b/dashboard/src/lib/api.ts index edbb67bc..5e3bf3a0 100644 --- a/dashboard/src/lib/api.ts +++ b/dashboard/src/lib/api.ts @@ -49,8 +49,8 @@ export interface UserProfile { user_id: string; profile_content?: string; topics?: Record; - created_at: string; - updated_at: string; + created_at?: string; + updated_at?: string; } export interface UserProfileListResponse { diff --git a/dashboard/src/routes/user-profile.tsx b/dashboard/src/routes/user-profile.tsx index 3a4f57ae..1b32cb93 100644 --- a/dashboard/src/routes/user-profile.tsx +++ b/dashboard/src/routes/user-profile.tsx @@ -119,7 +119,8 @@ function UserProfilePage() { return topicKeys.slice(0, 3).join(", ") + (topicKeys.length > 3 ? "..." : ""); }; - const formatDate = (dateString: string) => { + const formatDate = (dateString: string | undefined) => { + if (!dateString) return nullDisplay; try { return new Date(dateString).toLocaleString(); } catch {