More fixes

This commit is contained in:
Gregory Schier
2026-03-13 08:32:40 -07:00
parent 21f775741a
commit 560c4667e4
2 changed files with 2 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
import { clear, readText } from '@tauri-apps/plugin-clipboard-manager';
import * as m from 'motion/react-m';
import { useEffect, useState } from 'react';
import { fireAndForget } from '../lib/fireAndForget';
import { useImportCurl } from '../hooks/useImportCurl';
import { useWindowFocus } from '../hooks/useWindowFocus';
import { Button } from './core/Button';
@@ -16,7 +15,7 @@ export function ImportCurlButton() {
// oxlint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
fireAndForget(readText().then(setClipboardText));
readText().then(setClipboardText).catch(() => {});
}, [focused]);
if (!clipboardText?.trim().startsWith('curl ')) {

View File

@@ -57,7 +57,7 @@ export function PdfViewer({ bodyPath, data }: Props) {
externalLinkTarget="_blank"
externalLinkRel="noopener noreferrer"
>
{Array.from({ length: numPages }, (_, index) => (
{Array.from({ length: numPages ?? 0 }, (_, index) => (
<Page
className="mb-6 select-all"
renderTextLayer