removed unused prop
This commit is contained in:
parent
ca9bee8222
commit
4de9a0d085
1 changed files with 3 additions and 8 deletions
|
|
@ -15,21 +15,16 @@ import {
|
|||
interface DuplicateHandlingDialogProps {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
filename: string;
|
||||
onOverwrite: () => void | Promise<void>;
|
||||
isLoading?: boolean;
|
||||
}
|
||||
|
||||
export const DuplicateHandlingDialog: React.FC<
|
||||
DuplicateHandlingDialogProps
|
||||
> = ({ open, onOpenChange, filename, onOverwrite, isLoading = false }) => {
|
||||
> = ({ open, onOpenChange, onOverwrite, isLoading = false }) => {
|
||||
const handleOverwrite = async () => {
|
||||
try {
|
||||
await onOverwrite();
|
||||
onOpenChange(false);
|
||||
} catch (error) {
|
||||
// Error handling is done by the parent component
|
||||
}
|
||||
await onOverwrite();
|
||||
onOpenChange(false);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue