"use client"; import { useEffect, useState } from "react"; import { useParams, useRouter } from "next/navigation"; import { PageLoader } from "../../../Components/UI/Spinner"; import { Alert } from "../../../Components/UI/Alert"; import { fmtDate } from "../../../utils/helperFun"; import { getStoredToken } from "../../../lib/auth"; import { userService } from "../../../services/user.service"; import type { UserDetail } from "../../../types/user"; // ── helpers ─────────────────────────────────────────────────────────────────── function safeFmtDate(iso: string | null | undefined): string { if (!iso) return "—"; try { const d = new Date(iso); if (isNaN(d.getTime())) return "—"; return fmtDate(iso); } catch { return "—"; } } // ── sub-components ──────────────────────────────────────────────────────────── function SectionCard({ title, children }: { title: string; children: React.ReactNode }) { return (
{title}
ملف المستخدم
هذا الرمز حساس — لا تشاركه مع أي أحد.
غير متاح
)}