Compare commits

..

No commits in common. "9685d94b968af0b0d7fd7ba1b8ceb91d7ec1d546" and "d8d2e9f8e43e30960c5526b627cc482eb343a8b7" have entirely different histories.

1 changed files with 2 additions and 14 deletions

View File

@ -41,11 +41,6 @@ const InfoCard: React.FC<InfoCardProps> = ({ onAdd, onHeightChange }) => {
}
}
const handleDelete = (index: number) => {
const newContents = addedContents.filter((_, i) => i !== index);
setAddedContents(newContents);
}
return (
<div className="w-full">
<div className="flex items-center mb-3 w-full">
@ -70,16 +65,9 @@ const InfoCard: React.FC<InfoCardProps> = ({ onAdd, onHeightChange }) => {
{addedContents.map((item, index) => (
<div
key={index}
className="flex justify-between items-center p-2 border border-gray-200 rounded bg-gray-50 mb-2 last:mb-0"
className="p-2 border border-gray-200 rounded bg-gray-50 mb-2 last:mb-0"
>
<span>{item}</span>
<Button
type="text"
onClick={() => handleDelete(index)}
className="text-red-500"
>
X
</Button>
{item}
</div>
))}
</div>