Skip to content

Commit

Permalink
fix: fix type profile-favorites, remove props buttonText product-card
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-kolesnikov committed Nov 17, 2023
1 parent 7b439f8 commit c5764aa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/components/product-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ type ProductCardProps = {
cardName: string;
price: string;
weight: string;
buttonText: string;
cardImage: string;
category?: string;
idCard?: number;
checkboxControl?: { checked: boolean; onChange: () => void };
checkboxControl?: { checked: boolean; onChange: () => void };
};

const ProductCard = ({
Expand Down
1 change: 0 additions & 1 deletion src/components/product-card/product-card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const Default: Story = {
cardName: 'Манго Египет',
price: '80 руб.',
weight: '1кг',
buttonText: 'В корзину',
},
render: (args) => (
<BrowserRouter>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/profile/profile-addresses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function ProfileAddresses() {

const deleteAddress = (index: number) => {
return () => {
const filteredAddresses = addresses.filter((addressObj, i) => i !== index);
const filteredAddresses = addresses.filter((_, i) => i !== index);
console.log(filteredAddresses, 'Delete request...');
// setAddresses(filteredAddresses);
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/profile/profile-favorites/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Link } from 'react-router-dom';

type Product = {
name: string;
price: number;
price: string;
amount: string;
id: number;
photo: string;
Expand Down

0 comments on commit c5764aa

Please sign in to comment.