import React, { Component } from "react"; import { userProduct, comment, file } from "~/Redux/actions"; import Navbar from "../Home/Navbar/index"; import Input from "../Contact/Input/index"; import Select from "../Contact/Select/index"; import Upload from "./Upload"; import "./index.scss"; import { connect } from "react-redux"; const maxDesktopSize = 1250; const maxMobileSize = 550; const grades = [ "پیش دبستان", "اول", "دوم", "سوم", "چهارم", "پنجم", "ششم", "هفتم", "هشتم", "نهم", "دهم", "یازدهم", "دوازدهم", ]; const fontSize = { desktop: { h1: window.innerWidth > maxDesktopSize ? 30 : window.innerWidth / 40, p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 80, span: window.innerWidth > maxDesktopSize ? 16 : window.innerWidth / 80, }, mobile: { h1: window.innerWidth > maxMobileSize ? 25 : window.innerWidth / 16, p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 34, span: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 32, }, }; class Support extends Component { state = { name: null, cellphone: null, unit: null, bookId: null, subject: null, text: null, file: null, fileId: null, }; componentDidMount() { if (!this.props.myProductList) this.props.getUserProductList({}); } onChange = (name, value, type) => { if (type === "file") { this.props.upload({ file: value, target: name }); } this.setState({ [name]: value, }); }; async send() { const { submit, status: { userId }, } = this.props; const { text, fileId, name, cellphone, unit, bookId, subject } = this.state; await submit({ fileId, text, name, cellphone, unit, bookId, subject, userId, }); //todo redirectHome } render() { let { myProductList, status } = this.props; console.log({ myProductList }); return ( <>
برای ارتباط با دنیای شگفت انگیز دانوین از فرم زیر استفاده کنید و پس از انتخاب دپارتمان مد نظر پیام خود را ارسال کنید.
{status ? null : ( <> > )} {this.state.unit === "واحد محتوایی" ? (