Remove connected rows when removing chat (#490)
This commit is contained in:
parent
4880e0d94e
commit
fe3d58fc65
2 changed files with 5 additions and 5 deletions
|
|
@ -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('/');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue