More typing

This commit is contained in:
2025-04-15 22:16:27 -05:00
parent 78dec160b6
commit 4e9df7256b
27 changed files with 235 additions and 110 deletions

View File

@@ -1,8 +1,9 @@
import { ActionIcon, Box, Group, Text } from '@mantine/core';
import { useState } from 'react';
import { FiEdit } from 'react-icons/fi';
import type { Bookmark } from 'types';
function BookmarkSettingsItem({ bookmark }: any) {
function BookmarkSettingsItem({ bookmark }: { bookmark: Bookmark }) {
const [hover, setHover] = useState(false);
return (
<Box

View File

@@ -19,7 +19,7 @@ import DeleteItemModal from '../Shared/DeleteItemModal';
function DebouncedBookmarkItem({
bookmarkItem,
setIsOpen,
}: { bookmarkItem: Bookmark; setIsOpen: any }) {
}: { bookmarkItem: Bookmark; setIsOpen: (isOpen: boolean) => void }) {
const { theme, handleDelete } = useCommonHooks();
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
const { mutateAsync } = useMutationAPI();

View File

@@ -1,4 +1,10 @@
import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';
import {
DragDropContext,
Draggable,
type DraggableProvided,
Droppable,
type DroppableProvided,
} from '@hello-pangea/dnd';
import {
ActionIcon,
Box,
@@ -212,7 +218,7 @@ function DebouncedGroupSettingsItem({
<Stack>
<DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId={`${bookmarkGroup.id}`}>
{(provided) => (
{(provided: DroppableProvided) => (
<Stack ref={provided.innerRef} {...provided.droppableProps}>
{bookmarks.map((bookmark: Bookmark) => (
<Draggable
@@ -220,7 +226,7 @@ function DebouncedGroupSettingsItem({
draggableId={`${bookmark.id}`}
index={bookmark.index}
>
{(provided: any) => (
{(provided: DraggableProvided) => (
<Box
ref={provided.innerRef}
{...provided.draggableProps}
@@ -272,12 +278,10 @@ function DebouncedGroupSettingsItem({
/>
</Popover.Dropdown>
</Popover>
{provided.placeholder}
</Box>
)}
</Draggable>
))}
{provided.placeholder}
</Stack>
)}