import dayjs from 'dayjs'; import { ChevronLeft } from 'lucide-react'; import { useRef } from 'react'; import { Button, ContentTooltip, Skeleton, TextWithNAFallback } from '@ballerine/ui'; import { Separator } from '@/common/components/atoms/Separator/Separator'; import { SectionObserver } from '@/common/components/organisms/SectionObserver/SectionObserver'; import { NotesButton } from '@/domains/notes/NotesButton'; import { NotesSheet } from '@/domains/notes/NotesSheet'; import { MerchantMonitoringReportStatus } from '../MerchantMonitoring/components/MerchantMonitoringReportStatus/MerchantMonitoringReportStatus'; import { useIdentityVerificationPageLogic } from './hooks/useIdentityVerificationPageLogic'; export const IdentityVerificationAssessmentPage = () => { const { sections, check, isLoadingCheck, checkId, customer, onNavigateBack, notes, isNotesOpen, setIsNotesOpen, } = useIdentityVerificationPageLogic(); const sectionRefs = useRef<{ [key: string]: HTMLDivElement | null }>({}); if (isLoadingCheck || !check) { return ( <>
); } return (
{check.companyName}
Status
Created at {check.createdAt && dayjs(new Date(check.createdAt)).format('MMM Do, YYYY HH:mm')}
{/*
*/} {/* Monitoring Status */} {/* */} {/*   */} {/* */} {/*
*/}
{sections.map(section => { const titleContent = (
{section.Icon && } {section.title}
); return (
(sectionRefs.current[section.id] = el)} className="min-h-[100px]" // Minimum height helps with detection > {section.description ? ( {titleContent} ) : ( <>{titleContent} )} {section.Component}
); })}
); };