добавил модалку с прайсформой

This commit is contained in:
Joe_Peach committed 2026-04-07 15:20:18 +03:00
1 parent 27523cb2a1
commit ba921e8348
2 files changed
+9 -1

No files matched your search

@@ -181,7 +181,6 @@ const ModalRequestForm: React.FC<Props> = ({ open, onClose }) => {
<Button
label={isSubmitting ? "ОТПРАВКА..." : "СДЕЛАТЬ ЗАПРОС"}
className={styles.button}
/>
</form>
</motion.div>
+9
View File
@@ -4,6 +4,8 @@ import { useAppDispatch, useAppSelector } from "../../app/hooks";
import { fetchProductById } from "../../features/catalog/productsSlice";
import styles from "./ItemPage.module.css";
import type { CategoryAtributes, CategoryAtrVals } from "../../types/categories";
import Button from "../../components/Button/Button";
import PriceLisForm from "../../components/PriceLisForm/PriceLisForm";
const ItemPage = () => {
const { id } = useParams();
@@ -14,6 +16,8 @@ const ItemPage = () => {
const [activeTab, setActiveTab] = useState<"desc" | "chars">("desc");
const [open, setOpen] = useState(false);
useEffect(() => {
if (id) dispatch(fetchProductById(id));
}, [id]);
@@ -26,6 +30,7 @@ const ItemPage = () => {
return (
<div className={styles.page}>
<PriceLisForm open={open} onClose={() => setOpen(false)}/>
<div className={styles.top}>
<button className={styles.back} onClick={() => navigate(-1)}>
← НАЗАД В КАТАЛОГ
@@ -49,6 +54,10 @@ const ItemPage = () => {
<button className={styles.download}>
СКАЧАТЬ ПРАЙС-ЛИСТ
</button>
<Button
label="СКАЧАТЬ ПРАЙС-ЛИСТ"
onClick={() => setOpen(true)}
/>
</div>
</div>