/
lizardking
/
react_final
Обзор
Документация
Войти
/
lizardking
/
react_final
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
old
src/widgets/CardList/ui/CardList.tsx
28 строк
723 B
LizardKing
Initial commit
22 ноя 2025, 15:56
22 ноя 2025, 15:56
0df0d9e
Код
Авторство
О чём код?
import { Card } from 'shared/ui/Card' import * as styles from './CardList.module.css' const s = styles as unknown as Record<string, string> type CardListProps = { title: string products: Product[] } export const CardList = ({ title, products }: CardListProps) => { if (!products.length) { return <h1 className="header-title">Товар не найден</h1> } return ( <div className={s['card-list']}> <div className={s['card-list__header']}> <h2 className={s['card-list__title']}>{title}</h2> </div> <div className={s['card-list__items']}> {products.map((product) => ( <Card key={product.id} product={product} /> ))} </div> </div> ) }