Fix lint errors
This commit is contained in:
parent
b7f64a28b1
commit
ca895109f3
1 changed files with 6 additions and 7 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { Button } from '@headlessui/react';
|
|
||||||
import { Popover } from '@headlessui/react';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
import { useDocuments } from '@/contexts/DocumentContext';
|
import { useDocuments } from '@/contexts/DocumentContext';
|
||||||
import { PDFIcon, EPUBIcon, ChevronUpDownIcon } from '@/components/icons/Icons';
|
import { PDFIcon, EPUBIcon, ChevronUpDownIcon } from '@/components/icons/Icons';
|
||||||
|
|
@ -14,6 +12,9 @@ import {
|
||||||
ListboxButton,
|
ListboxButton,
|
||||||
ListboxOption,
|
ListboxOption,
|
||||||
ListboxOptions,
|
ListboxOptions,
|
||||||
|
Popover,
|
||||||
|
PopoverPanel,
|
||||||
|
Button,
|
||||||
} from '@headlessui/react';
|
} from '@headlessui/react';
|
||||||
|
|
||||||
type DocumentToDelete = {
|
type DocumentToDelete = {
|
||||||
|
|
@ -210,7 +211,7 @@ export function DocumentList() {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Failed to remove document:', err);
|
console.error('Failed to remove document:', err);
|
||||||
}
|
}
|
||||||
}, [documentToDelete]);
|
}, [documentToDelete, removePDF, removeEPUB]);
|
||||||
|
|
||||||
const toggleFolderCollapse = (folderId: string) => {
|
const toggleFolderCollapse = (folderId: string) => {
|
||||||
setCollapsedFolders(prev => {
|
setCollapsedFolders(prev => {
|
||||||
|
|
@ -422,7 +423,6 @@ export function DocumentList() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Popover className="fixed z-50">
|
<Popover className="fixed z-50">
|
||||||
{({ open }) => (
|
|
||||||
<>
|
<>
|
||||||
{pendingFolderDocs && (
|
{pendingFolderDocs && (
|
||||||
<div style={{
|
<div style={{
|
||||||
|
|
@ -430,7 +430,7 @@ export function DocumentList() {
|
||||||
left: `${mousePosition.x}px`,
|
left: `${mousePosition.x}px`,
|
||||||
top: `${mousePosition.y}px`
|
top: `${mousePosition.y}px`
|
||||||
}}>
|
}}>
|
||||||
<Popover.Panel
|
<PopoverPanel
|
||||||
static
|
static
|
||||||
className="bg-transparent backdrop-blur-md p-4 rounded-lg shadow-lg transform -translate-x-1/2 -translate-y-1/2"
|
className="bg-transparent backdrop-blur-md p-4 rounded-lg shadow-lg transform -translate-x-1/2 -translate-y-1/2"
|
||||||
>
|
>
|
||||||
|
|
@ -447,11 +447,10 @@ export function DocumentList() {
|
||||||
/>
|
/>
|
||||||
<p className="text-xs text-muted">Press Enter to create</p>
|
<p className="text-xs text-muted">Press Enter to create</p>
|
||||||
</div>
|
</div>
|
||||||
</Popover.Panel>
|
</PopoverPanel>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue