diff --git a/src/components/GradeFilter/index.scss b/src/components/GradeFilter/index.scss
index 5a498c5..3e92097 100644
--- a/src/components/GradeFilter/index.scss
+++ b/src/components/GradeFilter/index.scss
@@ -134,7 +134,7 @@
h1{
font-size: calc(100vw / 30);
background-color: #9CDF52;
- box-shadow: 0px 0px 20px #9CDF52;
+ box-shadow: 0px 0px 2px #9CDF52;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
padding: 12px 15px;
diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx
index 114dddb..ec4e77a 100644
--- a/src/components/Navbar/index.tsx
+++ b/src/components/Navbar/index.tsx
@@ -7,22 +7,26 @@ export default function Navbar() {
return (
diff --git a/src/components/Select/index.tsx b/src/components/Select/index.tsx
index b9273f4..876d7a2 100644
--- a/src/components/Select/index.tsx
+++ b/src/components/Select/index.tsx
@@ -2,12 +2,10 @@ import React from "react";
import { makeStyles, withStyles } from "@mui/styles";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
-import InputBase from "@mui/material/InputBase";
+import MenuItem from '@mui/material/MenuItem';
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import InputLabel from "@mui/material/InputLabel";
-const BootstrapInput = withStyles((theme) => ({}))(InputBase);
-
const useStyles = makeStyles((theme) => ({
marginLeft: {
// margin: theme.spacing(1),
@@ -15,41 +13,44 @@ const useStyles = makeStyles((theme) => ({
},
}));
-export default function CustomizedSelects({options, selectedOptions, name, label, onChange} : any) {
+export default function CustomizedSelects({
+ options,
+ selectedOptions,
+ name,
+ label,
+ onChange,
+}: any) {
const classes = useStyles();
return (
<>
- {window.innerWidth > 1000 ? (
-
-
-
- {label}
-
-
-
-
-
- ) : null}
+
+
+
+ {label}
+
+
+
+
+
>
);
}
diff --git a/src/custom.scss b/src/custom.scss
index debe871..7c41007 100644
--- a/src/custom.scss
+++ b/src/custom.scss
@@ -136,23 +136,21 @@
}
.MuiMenu-list {
- option {
- background-color: #272727 !important;
- font-family: numeralLight !important;
- padding: 5px 5px !important;
- color: #707070;
- font-size: 20px;
- border-bottom: 1px solid #707070;
- z-index: 1000 !important;
- padding: 10px !important;
- &:focus:enabled:hover {
- background-color: #272727 !important;
- border: 1px solid #84DE56 !important;
- }
- }
+
}
+
+.MuiMenuItem-root{
+ background: #272727 !important;
+ border-bottom: 1px solid #707070 !important;
+ color: white !important;
+ font-size: 14px !important;
+ font-family: numeralLight !important;
+ padding: 20px !important;
+}
+
.MuiSelect-root {
font-family: numeralLight !important;
+ color: white !important;
}
.MuiOutlinedInput-notchedOutline legend{
@@ -175,7 +173,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px){
.submit{
- font-size : calc(100vw / 70);
+ font-size : calc(100vw / 80);
}
.main{
main {
@@ -200,7 +198,7 @@
.desktop{
display: none !important;
}
- .submit-large{
+ .submit{
font-size: calc(100vw / 25);
}
}
\ No newline at end of file
diff --git a/src/redux/actions-type/public.tsx b/src/redux/actions-type/public.tsx
index 37dc593..6aa93ad 100644
--- a/src/redux/actions-type/public.tsx
+++ b/src/redux/actions-type/public.tsx
@@ -13,6 +13,11 @@ interface getBlogInfo{
data : any
}
+interface setFaqActive{
+ type : "public/faq/activate"
+ data : any
+}
+
interface error{
type : "error"
data : undefined
@@ -28,6 +33,6 @@ interface loading{
// }
-type PublicAction = getBlogList | getBlogInfo | getHomeData | loading | error;
+type PublicAction = getBlogList | getBlogInfo | getHomeData | setFaqActive | loading | error;
export default PublicAction;
diff --git a/src/redux/actions/book.tsx b/src/redux/actions/book.tsx
index 3a35406..2d2ecbd 100644
--- a/src/redux/actions/book.tsx
+++ b/src/redux/actions/book.tsx
@@ -36,6 +36,7 @@ const book = {
// filterBook: (data) => async (dispatch) => {
// dispatch({ type: "book/filter", data: data });
// },
+
};
export default book;
diff --git a/src/redux/actions/public.tsx b/src/redux/actions/public.tsx
index 4dd5ea8..c38ec98 100644
--- a/src/redux/actions/public.tsx
+++ b/src/redux/actions/public.tsx
@@ -7,8 +7,8 @@ const publicApi = {
// getFaqList: (data: undefined, history: any) => async (dispatch: Dispatch) =>
// await proxy.get("faq/list", data, { history, dispatch }),
- // setFaqActive: (data: undefined) => async (dispatch: Dispatch) =>
- // await dispatch({ type: "public/faq/activate", data: data }),
+ setFaqActive: (data: {}) => async (dispatch: Dispatch) =>
+ await dispatch({ type: "public/faq/activate", data: data }),
// searchFaq: (data: String) => async (dispatch: Dispatch) =>
// await dispatch({ type: "public/faq/search", data: data }),
diff --git a/src/redux/reducers/book.tsx b/src/redux/reducers/book.tsx
index 03fa243..53da1e1 100644
--- a/src/redux/reducers/book.tsx
+++ b/src/redux/reducers/book.tsx
@@ -291,7 +291,7 @@ const initialState = {
repliedTo : null,
date : '1400/07/29',
},
- ]
+ ]
};
const grades = [
diff --git a/src/redux/reducers/public.tsx b/src/redux/reducers/public.tsx
index 54b000f..debc825 100644
--- a/src/redux/reducers/public.tsx
+++ b/src/redux/reducers/public.tsx
@@ -80,24 +80,28 @@ const initialState = {
],
faqList: [
{
+ id : 0,
name: "نحوه خرید از سایت دانوین چگونه است ؟",
active: true,
value:
"لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی ",
},
{
+ id : 1,
name: "در این قسمت متن جدید خواهد آمد؟",
active: false,
value:
"لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی ",
},
{
+ id : 2,
name: "چرا باید در این قسمت پرسش های متداول طرح شود؟",
active: false,
value:
"لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی ",
},
{
+ id : 3,
name : 'این متن جهت سردرگرمی شما نوشته شده و کاربرد دیگری ندارد',
active : false,
value : 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی '
@@ -223,17 +227,17 @@ export default function publicApi(state = initialState, action: PublicAction) {
// };
// case "faq/list":
// return { ...state, loading: false, error: null, faqList: data };
- // case "public/faq/activate":
- // return {
- // ...state,
- // loading: false,
- // error: null,
- // faqList: state.faqList.map((item) =>
- // item.id === data
- // ? { ...item, active: !item.active }
- // : { ...item, active: false }
- // ),
- // };
+ case "public/faq/activate":
+ return {
+ ...state,
+ loading: false,
+ error: null,
+ faqList: state.faqList.map((item : any) =>
+ item.id === data
+ ? { ...item, active: !item.active }
+ : { ...item, active: false }
+ ),
+ };
// case "public/faq/search":
// return {
// ...state,
diff --git a/src/util/scroll.js b/src/util/scroll.js
new file mode 100644
index 0000000..d8776b4
--- /dev/null
+++ b/src/util/scroll.js
@@ -0,0 +1,11 @@
+import { toast } from "react-toastify";
+
+class scroll {
+ goToTop = () => {
+ window.scrollTo(0,0);
+ }
+}
+
+const _scroll = new scroll();
+
+export default _scroll;
diff --git a/src/views/Contact/index.scss b/src/views/Contact/index.scss
index 0691140..7192257 100644
--- a/src/views/Contact/index.scss
+++ b/src/views/Contact/index.scss
@@ -104,6 +104,7 @@
font-family: numeralLight;
font-size: 20px;
background-color: #272727;
+ line-height: 1.5;
&:focus{
border: 0.2px solid #84de56 !important;
border-radius: 10px;
@@ -116,7 +117,7 @@
position: absolute;
text-align: right !important;
right: 15px;
- top: 22px;
+ top: 18px;
padding: 0px !important;
transform: translate(0px, 0px) scale(1) !important;
}
@@ -221,7 +222,7 @@
position: absolute;
text-align: right !important;
right: 15px;
- top: 18px;
+ top: 15px;
padding: 0px !important;
transform: translate(0px, 0px) scale(1) !important;
}
@@ -482,7 +483,6 @@
transform: translate(0px, 0px) scale(0.85) !important;
padding: 0px 10px !important;
}
-
label {
background-color: #272727;
width: fit-content;
diff --git a/src/views/Contact/index.tsx b/src/views/Contact/index.tsx
index ebd883b..e1bbfbf 100644
--- a/src/views/Contact/index.tsx
+++ b/src/views/Contact/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, { useState, useEffect } from "react";
import "./index.scss";
import Navbar from "../../components/Navbar/index";
import Footer from "../../views/Home/Footer/index";
@@ -8,6 +8,7 @@ import Textarea from "../../components/Textarea/index";
import Select from "../../components/Select/index";
import Location from "../../components/Location/index";
import { connect } from "react-redux";
+import scroll from '../../util/scroll';
interface FormData {
name?: string;
@@ -23,6 +24,10 @@ function Contact({ departmans, selectedDepartman, contactData }: any) {
setFormData({ ...formData, [e.target.name]: e.target.value });
};
+ useEffect(() => {
+ scroll.goToTop();
+ },[])
+
return (
@@ -30,7 +35,7 @@ function Contact({ departmans, selectedDepartman, contactData }: any) {
-
+