Apply prettier formatting to PdfPreview and ReceiptViewer.test
CI / test (push) Successful in 25s
CI / lint (push) Successful in 28s
CI / vuln-scan (push) Successful in 14s
CI / sast (push) Successful in 10s
CI / push (push) Successful in 32s
CI / secrets-scan (push) Successful in 5s
CI / build-images (push) Successful in 1m58s
CI / image-scan (push) Successful in 50s

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 23:08:52 -07:00
parent c13b580bac
commit 3087efb5db
2 changed files with 5 additions and 4 deletions
@@ -64,9 +64,7 @@ export function PdfPreview({ blob }: Props) {
/>
)}
</Document>
{loadError && (
<p className="p-4 text-sm text-destructive">{loadError}</p>
)}
{loadError && <p className="p-4 text-sm text-destructive">{loadError}</p>}
</div>
{numPages > 1 && !loadError && (
<div className="flex items-center justify-center gap-3 border-t bg-muted/20 p-2">
@@ -205,7 +205,10 @@ describe('ReceiptViewer', () => {
it('shows the load error when the file fetch fails', async () => {
mockGetSession.mockResolvedValue({ data: { session: null } });
(globalThis.fetch as unknown as ReturnType<typeof vi.fn>).mockResolvedValue({ ok: false, status: 404 });
(globalThis.fetch as unknown as ReturnType<typeof vi.fn>).mockResolvedValue({
ok: false,
status: 404,
});
render(<ReceiptViewer receiptPath="receipts/user-1/missing.jpg" onClose={() => {}} />);