mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 20:31:47 +01:00
More fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { clear, readText } from '@tauri-apps/plugin-clipboard-manager';
|
import { clear, readText } from '@tauri-apps/plugin-clipboard-manager';
|
||||||
import * as m from 'motion/react-m';
|
import * as m from 'motion/react-m';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { fireAndForget } from '../lib/fireAndForget';
|
|
||||||
import { useImportCurl } from '../hooks/useImportCurl';
|
import { useImportCurl } from '../hooks/useImportCurl';
|
||||||
import { useWindowFocus } from '../hooks/useWindowFocus';
|
import { useWindowFocus } from '../hooks/useWindowFocus';
|
||||||
import { Button } from './core/Button';
|
import { Button } from './core/Button';
|
||||||
@@ -16,7 +15,7 @@ export function ImportCurlButton() {
|
|||||||
|
|
||||||
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fireAndForget(readText().then(setClipboardText));
|
readText().then(setClipboardText).catch(() => {});
|
||||||
}, [focused]);
|
}, [focused]);
|
||||||
|
|
||||||
if (!clipboardText?.trim().startsWith('curl ')) {
|
if (!clipboardText?.trim().startsWith('curl ')) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function PdfViewer({ bodyPath, data }: Props) {
|
|||||||
externalLinkTarget="_blank"
|
externalLinkTarget="_blank"
|
||||||
externalLinkRel="noopener noreferrer"
|
externalLinkRel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
{Array.from({ length: numPages }, (_, index) => (
|
{Array.from({ length: numPages ?? 0 }, (_, index) => (
|
||||||
<Page
|
<Page
|
||||||
className="mb-6 select-all"
|
className="mb-6 select-all"
|
||||||
renderTextLayer
|
renderTextLayer
|
||||||
|
|||||||
Reference in New Issue
Block a user