Bug fixes

This commit is contained in:
Sean Edmunds
2025-04-03 13:57:08 -05:00
parent 6493a458ff
commit d232a7bdb0
13 changed files with 77 additions and 35 deletions

View File

@@ -27,7 +27,10 @@ function DebouncedBookmarkItem({
const [bookmark, setBookmark] = useState<Bookmark>(bookmarkItem);
const [update, setUpdate] = useState<any>({});
const [debounced] = useDebouncedValue(update, 1000);
const handleClose = () => {
setIsOpen(false);
closeModal();
};
useEffect(() => {
if (Object.keys(debounced).length) {
mutateAsync({ method: 'PATCH', endpoint: 'api/links', body: debounced });
@@ -44,7 +47,7 @@ function DebouncedBookmarkItem({
<Card className={cardClasses.settingsItem} classNames={cardClasses}>
<DeleteItemModal
modalOpened={modalOpened}
handleClose={closeModal}
handleClose={handleClose}
body={
<Stack gap={0} w={'100%'} h={'150px'} align='center'>
<Text>Are you sure you want to delete this bookmark?</Text>
@@ -66,7 +69,7 @@ function DebouncedBookmarkItem({
styles={{ label: { color: 'black' } }}
onClick={() => {
handleDelete(bookmark, 'api/links');
closeModal();
handleClose();
}}
>
Delete
@@ -74,9 +77,7 @@ function DebouncedBookmarkItem({
<Button
color={'grey'}
styles={{ label: { color: 'black' } }}
onClick={() => {
closeModal();
}}
onClick={handleClose}
>
Cancel
</Button>