Files
co-lite/solvway-admin-portal/app/components/members/MemberCell.tsx
T
ngqileandClaude Opus 5.5 5ee51d1913 chore: copy kept Tastefully modules and portals into Co-Lite
Backend modules from tastefully 8bd93d15: core-libs, core-session,
api-gateway, mobile-api, services-auth, services-system,
services-counter, services-member, services-log, services-email.
solvway-admin-portal from babyboo f64d096ea, solvway-customer-portal
from tastefully 8bd93d15. Copied as tracked files only.

Literal secrets replaced with environment placeholders:
- services-email: SMTP_PASSWORD, MAILGUN_API_KEY, SENDGRID_API_KEY,
  MAILJET_API_KEY, MAILJET_SECRET_KEY (optional, empty default)
- services-system: JUMIO_TOKEN, JUMIO_SECRET (optional)
- services-auth: USER_AUTH_API_SECRET (required); commented JWT secret removed
- core-libs: JWT_TOKEN default removed (required), XXL_JOB_TOKEN default
  removed, ipgeolocation key read from IPGEOLOCATION_API_KEY
- services-system EkycAppConfig: commented Jumio credentials removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-11-26 15:55:45 +08:00

36 lines
1.2 KiB
TypeScript

import Link from "next/link";
import { useT } from "@/app/lib/i18n/MessagesProvider";
/**
* The member behind a listing row (fit-admin-listing-pages): code on top, linking to the member's
* page, name below in small muted text — the Wallet ledger's two-line cell. A guest reads "Guest"
* with their name, else email, else code, below. A name with no code shows alone, unlinked.
*/
export function MemberCell({ code, name, email, guest = false }: {
code?: string | null;
name?: string | null;
email?: string | null;
guest?: boolean;
}) {
const t = useT();
const below = guest ? (name || email || code) : name;
const top = guest ? (
<span className="font-medium">{t("MemberGuest")}</span>
) : code ? (
<Link
href={`/members/${code}`}
className="font-medium tabular hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
>
{code}
</Link>
) : null;
if (!top) return name ? <span>{name}</span> : <span className="text-muted-foreground">—</span>;
return (
<div className="flex flex-col">
{top}
{below && <span className="text-xs text-muted-foreground">{below}</span>}
</div>
);
}