Remove connected rows when removing chat (#490)

This commit is contained in:
Jeremy 2024-11-05 19:39:50 +03:00 committed by GitHub
parent 4880e0d94e
commit fe3d58fc65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -8,11 +8,7 @@ import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import useSWR from 'swr';
import {
InfoIcon,
MoreHorizontalIcon,
TrashIcon,
} from '@/components/custom/icons';
import { MoreHorizontalIcon, TrashIcon } from '@/components/custom/icons';
import {
AlertDialog,
AlertDialogAction,
@ -127,6 +123,7 @@ export function SidebarHistory({ user }: { user: User | undefined }) {
});
setShowDeleteDialog(false);
if (deleteId === id) {
router.push('/');
}