добавил модалку с прайсформой
This commit is contained in:
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
|
<Button
|
||||||
label={isSubmitting ? "ОТПРАВКА..." : "СДЕЛАТЬ ЗАПРОС"}
|
label={isSubmitting ? "ОТПРАВКА..." : "СДЕЛАТЬ ЗАПРОС"}
|
||||||
className={styles.button}
|
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import { useAppDispatch, useAppSelector } from "../../app/hooks";
|
|||||||
import { fetchProductById } from "../../features/catalog/productsSlice";
|
import { fetchProductById } from "../../features/catalog/productsSlice";
|
||||||
import styles from "./ItemPage.module.css";
|
import styles from "./ItemPage.module.css";
|
||||||
import type { CategoryAtributes, CategoryAtrVals } from "../../types/categories";
|
import type { CategoryAtributes, CategoryAtrVals } from "../../types/categories";
|
||||||
|
import Button from "../../components/Button/Button";
|
||||||
|
import PriceLisForm from "../../components/PriceLisForm/PriceLisForm";
|
||||||
|
|
||||||
const ItemPage = () => {
|
const ItemPage = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
@@ -14,6 +16,8 @@ const ItemPage = () => {
|
|||||||
|
|
||||||
const [activeTab, setActiveTab] = useState<"desc" | "chars">("desc");
|
const [activeTab, setActiveTab] = useState<"desc" | "chars">("desc");
|
||||||
|
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (id) dispatch(fetchProductById(id));
|
if (id) dispatch(fetchProductById(id));
|
||||||
}, [id]);
|
}, [id]);
|
||||||
@@ -26,6 +30,7 @@ const ItemPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.page}>
|
<div className={styles.page}>
|
||||||
|
<PriceLisForm open={open} onClose={() => setOpen(false)}/>
|
||||||
<div className={styles.top}>
|
<div className={styles.top}>
|
||||||
<button className={styles.back} onClick={() => navigate(-1)}>
|
<button className={styles.back} onClick={() => navigate(-1)}>
|
||||||
← НАЗАД В КАТАЛОГ
|
← НАЗАД В КАТАЛОГ
|
||||||
@@ -49,6 +54,10 @@ const ItemPage = () => {
|
|||||||
<button className={styles.download}>
|
<button className={styles.download}>
|
||||||
СКАЧАТЬ ПРАЙС-ЛИСТ
|
СКАЧАТЬ ПРАЙС-ЛИСТ
|
||||||
</button>
|
</button>
|
||||||
|
<Button
|
||||||
|
label="СКАЧАТЬ ПРАЙС-ЛИСТ"
|
||||||
|
onClick={() => setOpen(true)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user