.
This commit is contained in:
1 parent
1f0b2ff3eb
commit
277558b34c
1 file changed
+25
-26
@@ -3,6 +3,7 @@ import styles from "./Categories.module.css";
|
||||
import Button from "../Button/Button";
|
||||
import category_internal1 from "../../assets/images/mainPage/category_internal1.jpg"
|
||||
import category_interna2 from "../../assets/images/mainPage/category_internal2.jpg"
|
||||
import { useAppSelector, useAppDispatch } from "../../app/hooks";
|
||||
|
||||
interface CategoryItem {
|
||||
id: number;
|
||||
@@ -46,39 +47,37 @@ const handleClick = () => {
|
||||
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<h2 className={styles.header}>КАТЕГОРИИ ТОВАРОВ</h2>
|
||||
<h2 className={styles.header}>КАТЕГОРИИ ТОВАРОВ</h2>
|
||||
|
||||
|
||||
<div className={styles.grid}>
|
||||
{categories.map((cat) => (
|
||||
<div
|
||||
key={cat.id}
|
||||
className={`${styles.card} ${cat.highlight ? styles.highlight : ""}`}
|
||||
>
|
||||
<img src={cat.image} className={styles.image} alt={cat.title} />
|
||||
|
||||
|
||||
{cat.highlight && (
|
||||
<div className={styles.overlay}>
|
||||
<h3>{cat.title}</h3>
|
||||
{cat.subtitle && <h4>{cat.subtitle}</h4>}
|
||||
<Button
|
||||
<div className={styles.grid}>
|
||||
{categories.map((cat) => (
|
||||
<div
|
||||
key={cat.id}
|
||||
className={`${styles.card} ${cat.highlight ? styles.highlight : ""}`}
|
||||
>
|
||||
<img src={cat.image} className={styles.image} alt={cat.title} />
|
||||
{cat.highlight && (
|
||||
<div className={styles.overlay}>
|
||||
<h3>{cat.title}</h3>
|
||||
{cat.subtitle && <h4>{cat.subtitle}</h4>}
|
||||
<Button
|
||||
label="СМОТРЕТЬ КАТАЛОГ"
|
||||
onClick={handleClick}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
{!cat.highlight && (
|
||||
<div className={styles.titleSmall}>
|
||||
<span>{cat.title}</span>
|
||||
{cat.subtitle && <span>{cat.subtitle}</span>}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{!cat.highlight && (
|
||||
<div className={styles.titleSmall}>
|
||||
<span>{cat.title}</span>
|
||||
{cat.subtitle && <span>{cat.subtitle}</span>}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user