'use client' import { useEffect, useState } from 'react' import { useTranslations } from 'next-intl' import { ExternalLink, FileText } from 'lucide-react' import { Skeleton } from '@/components/ui/skeleton' import { cn } from '@/lib/utils' /** * Side-by-side document viewer used while booking manually, so the user can * read the figures off a receipt/invoice while filling in the journal entry. * * Renders by document id through the same-origin inline proxy * (/api/documents/:id/inline). PDFs use rather * than