Fix type errors in filtering
Fixes type errors related to transaction filtering and property assignments.
This commit is contained in:
@@ -19,10 +19,12 @@ export type Transaction = {
|
||||
interface TransactionCardProps {
|
||||
transaction: Transaction;
|
||||
onUpdate?: (updatedTransaction: Transaction) => void;
|
||||
onDelete?: (id: string) => void; // onDelete 속성 추가
|
||||
}
|
||||
|
||||
const TransactionCard: React.FC<TransactionCardProps> = ({
|
||||
transaction,
|
||||
onDelete, // onDelete prop 추가
|
||||
}) => {
|
||||
const [isEditDialogOpen, setIsEditDialogOpen] = useState(false);
|
||||
const { title, amount, date, category } = transaction;
|
||||
@@ -47,6 +49,7 @@ const TransactionCard: React.FC<TransactionCardProps> = ({
|
||||
transaction={transaction}
|
||||
open={isEditDialogOpen}
|
||||
onOpenChange={setIsEditDialogOpen}
|
||||
onDelete={onDelete} // onDelete prop 전달
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user