diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index eae1119..b7d1678 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,3 +41,7 @@ jobs: - name: Deploy to S3 run: | aws s3 sync dist/ s3://${{ secrets.AWS_S3_BUCKET }} --delete + + - name: Invalidate CloudFront + run: | + aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*" diff --git a/src/components/ReceiptItemList.tsx b/src/components/ReceiptItemList.tsx index 922d625..f559b75 100644 --- a/src/components/ReceiptItemList.tsx +++ b/src/components/ReceiptItemList.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Check, Edit2, Save } from 'lucide-react'; +import { Check, Edit2 } from 'lucide-react'; import { useAppStore } from '../store'; import type { ReceiptItem } from '../types'; @@ -39,16 +39,7 @@ const ReceiptItemCard: React.FC = ({ item, isHighlighted } } }; - const handleCancel = (e: React.MouseEvent) => { - e.stopPropagation(); - setEditForm({ - description: item.description, - price: item.price.toString(), - discount: item.discount ? item.discount.toString() : '', - originalPrice: item.originalPrice ? item.originalPrice.toString() : item.price.toString() - }); - setIsEditing(false); - }; + // Calculate dynamic values for display during edit const currentOriginal = parseFloat(editForm.originalPrice) || 0;