diff --git a/src/assets/img/group-9.svg b/src/assets/img/group-9.svg new file mode 100644 index 0000000..c6073d3 --- /dev/null +++ b/src/assets/img/group-9.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/header/Header.js b/src/components/header/Header.js index d197530..86ca380 100644 --- a/src/components/header/Header.js +++ b/src/components/header/Header.js @@ -8,7 +8,7 @@ import MobileSideMenu from './MobileSideMenu'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; - +import exitIcon from '../../assets/img/group-9.svg' const Header = ({ isMobile @@ -27,7 +27,7 @@ const Header = ({
{ - isMobile ? + isMobile ?
setMenuPopup(!menuPopup)}> @@ -105,13 +105,28 @@ const Header = ({ { isMobile && menuPopup && <> -
+
- - + > + + +
} diff --git a/src/components/header/MobileSideMenu/arrow-down.svg b/src/components/header/MobileSideMenu/arrow-down.svg new file mode 100644 index 0000000..30b722b --- /dev/null +++ b/src/components/header/MobileSideMenu/arrow-down.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/header/MobileSideMenu/book-1-active.svg b/src/components/header/MobileSideMenu/book-1-active.svg new file mode 100644 index 0000000..b5d5da7 --- /dev/null +++ b/src/components/header/MobileSideMenu/book-1-active.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/header/MobileSideMenu/book-1.svg b/src/components/header/MobileSideMenu/book-1.svg new file mode 100644 index 0000000..7d82ab8 --- /dev/null +++ b/src/components/header/MobileSideMenu/book-1.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/header/MobileSideMenu/element-equal-active.svg b/src/components/header/MobileSideMenu/element-equal-active.svg new file mode 100644 index 0000000..091fe6a --- /dev/null +++ b/src/components/header/MobileSideMenu/element-equal-active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/element-equal.svg b/src/components/header/MobileSideMenu/element-equal.svg new file mode 100644 index 0000000..a9ceeaa --- /dev/null +++ b/src/components/header/MobileSideMenu/element-equal.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/index.js b/src/components/header/MobileSideMenu/index.js index 2b9465c..d68b2c5 100644 --- a/src/components/header/MobileSideMenu/index.js +++ b/src/components/header/MobileSideMenu/index.js @@ -1,9 +1,128 @@ -import React from "react"; +import React, {useState} from "react"; +import arrowIcon from './arrow-down.svg'; +import { Link } from "react-router-dom"; +import { useLocation } from "react-router-dom"; +//assets +import profileIcon from './profile.svg' +import elementIcon from './element-equal.svg'; +import taskIcon from './task-square.svg'; +import bookIcon from './book-1.svg'; +import smsIcon from './sms.svg'; +import mapIcon from './map.svg'; +import radarIcon from './radar-1.svg'; +import exitIcon from './logout.svg'; -const MobileSideMenu = () => { +//active Icons +import profileIconActive from './profile-active.svg' +import elementIconActive from './element-equal-active.svg'; +import taskIconActive from './task-square-active.svg'; +import bookIconActive from './book-1-active.svg'; +import smsIconActive from './sms-active.svg'; +import mapIconActive from './map-active.svg'; +import radarIconActive from './radar-1-active.svg'; + +const MobileSideMenu = ({ + profilePic, + users, + close +}) => { + const location = useLocation(); + const [showUsers, setShowUsers] = useState(false); + + + const options = [ + { + icon: profileIcon, + activeIcon: profileIconActive, + title: 'مشخصات', + link: '/' + }, + { + icon: elementIcon, + activeIcon: elementIconActive, + title: 'انتخاب خدمات', + link: '/services' + }, + { + icon: taskIcon, + activeIcon: taskIconActive, + title: 'آزمون های من', + link: '' + }, + { + icon: bookIcon, + activeIcon: bookIconActive, + title: 'وبلاگ', + link: '' + }, + { + icon: elementIcon, + activeIcon: elementIconActive, + title: 'خدمات من', + link: '' + }, + { + icon: smsIcon, + activeIcon: smsIconActive, + title: 'پشتیبانی', + link: '' + }, + { + icon: mapIcon, + activeIcon: mapIconActive, + title: 'اطلاعات تماس', + link: '/contact' + }, + { + icon: radarIcon, + activeIcon: radarIconActive, + title: 'گزارش ایراد یا نقص فنی', + link: '' + }, + { + icon: exitIcon, + activeIcon: exitIcon, + title: 'خروج', + link: '' + }, + ] return ( -
- +
+
+ +
+
+
+

{users[0].name}

+

{users[0].title}

+
+ setShowUsers(!showUsers)}/> +
+ { + showUsers && users.slice(1, 100).map((user) => ( +
+
+

{user.name}

+

{user.title}

+
+ +
+ )) + } +
+
+ { + options.map((item) => ( + close()} + className={`w-full py-1 flex items-center ${location.pathname == item.link ? 'border-r-4 border-red52 text-red52 font-bold' : 'text-grayAB '}`} + style={{background: location.pathname == item.link && 'linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(223,20,82,0.2) 100%)', borderRight: location.pathname == item.link && '8px solid #df1452'}} + > + +

{item.title}

+ + )) + }
) } diff --git a/src/components/header/MobileSideMenu/logout.svg b/src/components/header/MobileSideMenu/logout.svg new file mode 100644 index 0000000..52f0b4e --- /dev/null +++ b/src/components/header/MobileSideMenu/logout.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/header/MobileSideMenu/map-active.svg b/src/components/header/MobileSideMenu/map-active.svg new file mode 100644 index 0000000..1910537 --- /dev/null +++ b/src/components/header/MobileSideMenu/map-active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/map.svg b/src/components/header/MobileSideMenu/map.svg new file mode 100644 index 0000000..62d5181 --- /dev/null +++ b/src/components/header/MobileSideMenu/map.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/profile-active.svg b/src/components/header/MobileSideMenu/profile-active.svg new file mode 100644 index 0000000..dbf55ca --- /dev/null +++ b/src/components/header/MobileSideMenu/profile-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/header/MobileSideMenu/profile.svg b/src/components/header/MobileSideMenu/profile.svg new file mode 100644 index 0000000..a83fa62 --- /dev/null +++ b/src/components/header/MobileSideMenu/profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/header/MobileSideMenu/radar-1-active.svg b/src/components/header/MobileSideMenu/radar-1-active.svg new file mode 100644 index 0000000..e1e7784 --- /dev/null +++ b/src/components/header/MobileSideMenu/radar-1-active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/radar-1.svg b/src/components/header/MobileSideMenu/radar-1.svg new file mode 100644 index 0000000..a2ae8e3 --- /dev/null +++ b/src/components/header/MobileSideMenu/radar-1.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/sms-active.svg b/src/components/header/MobileSideMenu/sms-active.svg new file mode 100644 index 0000000..52c3f18 --- /dev/null +++ b/src/components/header/MobileSideMenu/sms-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/header/MobileSideMenu/sms.svg b/src/components/header/MobileSideMenu/sms.svg new file mode 100644 index 0000000..372a869 --- /dev/null +++ b/src/components/header/MobileSideMenu/sms.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/header/MobileSideMenu/task-square-active.svg b/src/components/header/MobileSideMenu/task-square-active.svg new file mode 100644 index 0000000..9b2ef32 --- /dev/null +++ b/src/components/header/MobileSideMenu/task-square-active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/header/MobileSideMenu/task-square.svg b/src/components/header/MobileSideMenu/task-square.svg new file mode 100644 index 0000000..eb1e8c6 --- /dev/null +++ b/src/components/header/MobileSideMenu/task-square.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/nav/Nav.js b/src/components/nav/Nav.js index 6e1cba7..03a582b 100644 --- a/src/components/nav/Nav.js +++ b/src/components/nav/Nav.js @@ -6,7 +6,7 @@ import { defineLordIconElement } from "lord-icon-element"; import logo from "../../assets/img/logo.png"; import img1 from "../../assets/img/Group 1440.svg"; -import { Link } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; import MinimalNav from "./minimalNav"; // defineLordIconElement(loadAnimation); @@ -21,7 +21,7 @@ const Nav = ({ }) => { const [type, setType] = useState('default'); - + const location2 = useLocation(); useEffect(() => { if(location.includes('adminpanel')){ setType('minimal'); @@ -100,7 +100,9 @@ useEffect(() => { document.querySelector(".back-item-img").style.top = `${top}%`; }; if (isMobile) { + return ( + location2.pathname.includes('azmoon_list') ? null :
{ diff --git a/src/components/nav/empty-wallet.svg b/src/components/nav/empty-wallet.svg index 44fad32..79b5950 100644 --- a/src/components/nav/empty-wallet.svg +++ b/src/components/nav/empty-wallet.svg @@ -1,9 +1,10 @@ - - - - - - - - - + + + + + + + + + + diff --git a/src/components/nav/home-2.svg b/src/components/nav/home-2.svg index c18219e..58cf51c 100644 --- a/src/components/nav/home-2.svg +++ b/src/components/nav/home-2.svg @@ -1,4 +1,7 @@ - - - - + + + + + + + diff --git a/src/components/nav/profile.svg b/src/components/nav/profile.svg index 697385b..f939d84 100644 --- a/src/components/nav/profile.svg +++ b/src/components/nav/profile.svg @@ -1,4 +1,10 @@ - - - - + + + + + + + + + + diff --git a/src/components/nav/vuesax-bold-element-4-2.svg b/src/components/nav/vuesax-bold-element-4-2.svg index 7d48df4..7e01cb4 100644 --- a/src/components/nav/vuesax-bold-element-4-2.svg +++ b/src/components/nav/vuesax-bold-element-4-2.svg @@ -1,24 +1,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/components/nav/vuesax-linear-logout.svg b/src/components/nav/vuesax-linear-logout.svg index e586c35..fdaa032 100644 --- a/src/components/nav/vuesax-linear-logout.svg +++ b/src/components/nav/vuesax-linear-logout.svg @@ -1,8 +1,13 @@ - - - - - - - - + + + + + + + + + + + + + diff --git a/src/view/Exam/EnterExam/desktop/index.css b/src/view/Exam/EnterExam/desktop/index.css index 8652735..c1b2974 100644 --- a/src/view/Exam/EnterExam/desktop/index.css +++ b/src/view/Exam/EnterExam/desktop/index.css @@ -22,29 +22,9 @@ --font3:IRANSansXFaNum-Regular; } */ - .enter-exam{ - width: 98vw; - position: absolute; - top: 0; - left: 0; - display: flex; - align-items: center; - justify-content: center; - /* background-image: url(../../../assets/azmoon-list/Group895.png); */ - background-size: 100% 100%; - } - - .enter-exam-box{ - /* width: 466px; */ - /* height: 662px; */ - height: 70vh; - aspect-ratio: 0.7/1; - margin-top: 110px; - padding: 25px; - border: 2px solid #EBEBEB; - border-radius: 8px; - background-color: white; - } + + + .eeb-title-box{ width: 100%; @@ -198,4 +178,45 @@ .eeb-timer div { margin-left: 5px; + } + + @media only screen and (max-width: 800px) { + + + .enter-exam-box{ + height: auto; + aspect-ratio: 0.7/1; + margin-top: 50px; + padding: 25px; + border: 0px solid #EBEBEB; + border-radius: 8px; + background-color: white; + margin-bottom: 200px; + } + + } + @media only screen and (min-width: 800px) { + .enter-exam{ + width: 98vw; + position: absolute; + top: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + /* background-image: url(../../../assets/azmoon-list/Group895.png); */ + background-size: 100% 100%; + + } + .enter-exam-box{ + /* width: 466px; */ + /* height: 662px; */ + height: 70vh; + aspect-ratio: 0.7/1; + margin-top: 110px; + padding: 25px; + border: 2px solid #EBEBEB; + border-radius: 8px; + background-color: white; + } } \ No newline at end of file diff --git a/src/view/Exam/EnterExam/desktop/index.js b/src/view/Exam/EnterExam/desktop/index.js index 7a868bc..fb3628b 100644 --- a/src/view/Exam/EnterExam/desktop/index.js +++ b/src/view/Exam/EnterExam/desktop/index.js @@ -12,216 +12,12 @@ import icon6 from "../../../../assets/azmoon-list/people.png"; import icon7 from "../../../../assets/azmoon-list/profile-2user.png"; import icon8 from "../../../../assets/azmoon-list/message-text-2.png"; import avatar from "../../../../assets/azmoon-list/tushar-khandagale-dvtAuBHBAVQ-unsplash.jpg"; -// import img1 from '../../assets/store/amazing-suggest/ella-olsson-KPDbRyFOTnE-unsplash.jpg'; -// import img2 from '../../assets/store/amazing-suggest/antoine-dautry-_zsL306fDck-unsplash.jpg'; -// import img3 from '../../assets/store/amazing-suggest/ahmed-almakhzanji-kshkB1i5_5o-unsplash.jpg'; import { Link } from "react-router-dom"; import moment from "jalali-moment"; import { useEffect } from "react"; import { state } from "../../../../components/exam/Carousel/state"; -// let common_data = [ -// { -// id:1, -// img:img1, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"450.200", -// discounted_price:"405.000", -// discount:"10%", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "discounted", -// exam_filter:"none", -// user_num:100, -// max_user:130, -// time:"9:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:2, -// img:img3, -// title:"آزمون زیست شناسی دهم", -// // price:458.200, -// price:"350.000", -// discounted_price:"305.000", -// discount:"10%", -// date:"28 آبان 1400", -// level:"کارشناسی", -// type:"گروهی", -// filter: "discounted", -// exam_filter:"live", -// user_num:100, -// max_user:130, -// time:"12:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:3, -// img:img1, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"350.200", -// discounted_price:"305.000", -// discount:"10%", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "discounted", -// exam_filter:"none", -// user_num:100, -// max_user:130, -// time:"12:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:4, -// img:img3, -// title:"آزمون روان درمانی اگزیستانسیال", -// // price:458.200, -// price:"458.200", -// discounted_price:"", -// discount:"", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "none", -// exam_filter:"collegiate", -// user_num:100, -// max_user:130, -// time:"10:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:5, -// img:img2, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"458.200", -// discounted_price:"", -// discount:"", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "none", -// exam_filter:"collegiate", -// user_num:90, -// max_user:100, -// time:"11:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:6, -// img:img1, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"458.200", -// discounted_price:"", -// discount:"", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "none", -// exam_filter:"none", -// user_num:100, -// max_user:120, -// time:"12:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:7, -// img:img1, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"350.000", -// discounted_price:"", -// discount:"", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "none", -// exam_filter:"collegiate", -// user_num:100, -// max_user:130, -// time:"12:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// }, -// { -// id:8, -// img:img2, -// title:"آزمون آشپزی شرق آسیا", -// // price:458.200, -// price:"458.200", -// discounted_price:"رایگان", -// discount:"100%", -// date:"28 آبان 1400", -// level:"پایه 1 الی 12", -// type:"گروهی", -// filter: "free", -// exam_filter:"none", -// user_num:100, -// max_user:130, -// time:"12:30", -// negetive_point:"دارد", -// question_type:"تشریحی و تستی", -// guide_file:"دارد", -// guide_file_link:"#", -// creator:{ -// avatar:avatar, -// name:"موسسه فرهنگی مصباح نور" -// }, -// } -// ] + const EnterExam = ({ ID }) => { // const state = useSelector((state) => state.default); diff --git a/src/view/Exam/EnterExam/index.js b/src/view/Exam/EnterExam/index.js index 13f3ac7..beb967a 100644 --- a/src/view/Exam/EnterExam/index.js +++ b/src/view/Exam/EnterExam/index.js @@ -1,14 +1,14 @@ import EnterExam from "./desktop"; import { useParams } from "react-router-dom"; // import MobileEnterExam from "../../component/mobile/azmoon-list/M_EnterExam"; - +import MobileEnterExam from "./mobile"; const ENTER_EXAM = () => { const { id } = useParams(); return (
{window.innerWidth > 1000 && } - {/* {window.innerWidth < 1000 && } */} + {window.innerWidth < 1000 && }
); }; diff --git a/src/view/Exam/EnterExam/mobile/index.js b/src/view/Exam/EnterExam/mobile/index.js new file mode 100644 index 0000000..a7de88b --- /dev/null +++ b/src/view/Exam/EnterExam/mobile/index.js @@ -0,0 +1,194 @@ +import "../desktop/index.js"; +import { useSelector } from "react-redux"; +import { useState } from "react"; + +import img0 from "../../../../assets/azmoon-list/test.png"; +import icon1 from "../../../../assets/azmoon-list/stickynote.png"; +import icon2 from "../../../../assets/azmoon-list/teacher.png"; +import icon3 from "../../../../assets/azmoon-list/clock.png"; +import icon4 from "../../../../assets/azmoon-list/message-minus.png"; +import icon5 from "../../../../assets/azmoon-list/Group893.png"; +import icon6 from "../../../../assets/azmoon-list/people.png"; +import icon7 from "../../../../assets/azmoon-list/profile-2user.png"; +import icon8 from "../../../../assets/azmoon-list/message-text-2.png"; +import avatar from "../../../../assets/azmoon-list/tushar-khandagale-dvtAuBHBAVQ-unsplash.jpg"; + +import { Link } from "react-router-dom"; +import moment from "jalali-moment"; +import { useEffect } from "react"; +import { state } from "../../../../components/exam/Carousel/state"; + + +const MobileEnterExam = ({ ID }) => { +// const state = useSelector((state) => state.default); + const [common_data] = useState(state); + console.log(common_data); + let data; + for (let i = 0; i < common_data.length; i++) { + if (common_data[i].id === Number(ID)) { + data = common_data[i]; + } + } + console.log("cc:"+data); + //--today date--and timer setting----------------------------- + let today = new Date(); + let examDate = new Date(data.date) + console.log(today); + console.log(examDate); + let diff = (examDate-today)/1000; + let d = Math.floor(diff/86400); + console.log(d); + let h = Math.floor((diff-(86400*d))/3600); + console.log(h); + let m = Math.floor((diff-(86400*d)-(h*3600))/60); + console.log(m); + let s = Math.floor(diff-(86400*d)-(h*3600)-(m*60)); + console.log(s); + const [timer,setTimer]=useState({ + d,h,m,s + }) + + useEffect(() => { + // console.log(sec); + if (timer.s >= 0 && diff > 0) { + setTimeout(() => { + // console.log("okdkdokodkd"); + setTimer({ + d, + h, + m, + s:s-1 + }); + if (timer.s === 0) { + setTimer({ + d, + h, + m:m-1, + s:59 + }); + } + if (timer.m === 0) { + setTimer({ + d, + h:h-1, + m:59, + s:59 + }); + } + if (timer.h === 0) { + setTimer({ + d:d-1, + h:23, + m:59, + s:59 + }); + } + }, 1000); + } + }); + //------------------------------------------- + moment.locale("en"); + return ( +
+
+
+ title-box-img +
به {data?.name}
+
خوش آمدید
+
+
+ name-icon +
نام آزمون:
+
{data?.name.substr(6)}
+
+
+ name-icon +
پایه تحصیلی:
+
{data?.level}
+
+
+ name-icon +
زمان آزمون:
+
+ {moment(data?.date, 'YYYY/MM/DD').format('jYYYY/jM/jD')} +
+
ساعت + {examDate.getHours()}:{examDate.getMinutes()} + +
+
+
+
+ name-icon +
نمره منفی:
+
+ {data?.negattiveMode && "دارد"} + {!data?.negattiveMode && "ندارد"} +
+
+
+ name-icon +
نوع سوالات:
+
{data?.types}
+
+
+
+
+ name-icon +
حدنصاب شرکت کنندگان:
+
{data?.capacity} نفر
+
+
+ name-icon +
نوع شرکت در آزمون:
+
+ {data?.type===1 && "انفرادی"} + {data?.type===2 && "گروهی"} +
+
+
+
+ name-icon +
فایل راهنما:
+
+ {data?.guideFileId && "دارد"} + {!data?.guideFileId && "ندارد"} -
+ + دریافت فایل + +
+
+
+ name-icon +
+
ایجاد شده توسط
+
موسسه فرهنگی مصباح نور
+
+ {(new Date(data.date) + شروع آزمون + } + {(new Date(data.date)>today) && +
+
{timer.d} روز و
+
{timer.h} ساعت و
+
{timer.m} دقیقه و
+
{timer.s} ثانیه
+
تا شروع آزمون
+
+ } +
+
+ ); +}; + +export default MobileEnterExam; diff --git a/src/view/Exam/M_Exam.js b/src/view/Exam/M_Exam.js new file mode 100644 index 0000000..35fab45 --- /dev/null +++ b/src/view/Exam/M_Exam.js @@ -0,0 +1,749 @@ +import { VscCircleFilled } from "react-icons/vsc"; +import "./M_Exam.scss"; +import icon1 from "../../assets/azmoon-list/exam/Group 115.png"; +import icon2 from "../../assets/azmoon-list/exam/Group 116.png"; +import { useState } from "react"; +import q_img1 from "../../assets/azmoon-list/exam/amanda-jones-oHVdj31R3F4-unsplash.jpg"; +import { useSelector } from "react-redux"; + + +let choice_badge_list = ["الف", "ب", "ج", "د"]; + +const M_Exam = ({ ID }) => { + const [data_list] = useState([ + { + id: 1, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 1, + choice: "3", + isSelected: false, + }, + { + id: 2, + sub_id: 1, + choice: "5", + isSelected: false, + }, + { + id: 3, + sub_id: 1, + choice: "9", + isSelected: false, + }, + { + id: 4, + sub_id: 1, + choice: "10", + isSelected: false, + }, + ], + }, + { + id: 2, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 2, + choice: "امکان دارد شاید و یا یک چیز دیگر", + isSelected: false, + }, + { + id: 2, + sub_id: 2, + choice: "امکان دارد گزینه اول درست باشد", + isSelected: false, + }, + ], + }, + { + id: 3, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 3, + choice: "پاسخ الف درست است", + isSelected: false, + }, + { + id: 2, + sub_id: 3, + choice: "پاسخ ب درست است", + isSelected: false, + }, + { + id: 3, + sub_id: 3, + choice: "پاسخ ج درست است", + isSelected: false, + }, + { + id: 4, + sub_id: 3, + choice: "پاسخ د درست است", + isSelected: false, + }, + ], + }, + { + id: 4, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 4, + choice: "پاسخ الف", + isSelected: false, + }, + { + id: 2, + sub_id: 4, + choice: "پاسخ ب", + isSelected: false, + }, + { + id: 3, + sub_id: 4, + choice: "پاسخ ج", + isSelected: false, + }, + { + id: 4, + sub_id: 4, + choice: "پاسخ د", + isSelected: false, + }, + ], + }, + { + id: 5, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 5, + choice: "الف", + isSelected: false, + }, + { + id: 2, + sub_id: 5, + choice: "ب", + isSelected: false, + }, + { + id: 3, + sub_id: 5, + choice: "ج", + isSelected: false, + }, + ], + }, + { + id: 6, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 6, + choice: "سال 2010", + isSelected: false, + }, + { + id: 2, + sub_id: 6, + choice: "سال 2015", + isSelected: false, + }, + { + id: 3, + sub_id: 6, + choice: "سال 2017", + isSelected: false, + }, + { + id: 4, + sub_id: 6, + choice: "سال 2020", + isSelected: false, + }, + ], + }, + { + id: 7, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 7, + choice: "امکان دارد شاید و یا یک چیز دیگر", + isSelected: false, + }, + { + id: 2, + sub_id: 7, + choice: "امکان دارد گزینه اول درست باشد", + isSelected: false, + }, + ], + }, + { + id: 8, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 8, + choice: "پاسخ الف درست است", + isSelected: false, + }, + { + id: 2, + sub_id: 8, + choice: "پاسخ ب درست است", + isSelected: false, + }, + { + id: 3, + sub_id: 8, + choice: "پاسخ ج درست است", + isSelected: false, + }, + { + id: 4, + sub_id: 8, + choice: "پاسخ د درست است", + isSelected: false, + }, + ], + }, + { + id: 9, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 9, + choice: "من نظری ندارم", + isSelected: false, + }, + { + id: 2, + sub_id: 9, + choice: "سوال مبهم است", + isSelected: false, + }, + { + id: 3, + sub_id: 9, + choice: "جواب تقریبی است", + isSelected: false, + }, + { + id: 4, + sub_id: 9, + choice: "جواب قطعی است", + isSelected: false, + }, + ], + }, + { + id: 10, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 10, + choice: + "این متنی آزمایشی برای تست این کد است و معنای دیگری ندارد و ادامه ای این متن نیز برای طولانی کردن پاسخ است و هدف دیگری ندارد", + isSelected: false, + }, + { + id: 2, + sub_id: 10, + choice: "این متنی آزمایشی برای تست این کد و معنای دیگری ندارد", + isSelected: false, + }, + { + id: 3, + sub_id: 10, + choice: "این متنی آزمایشی برای تست این کد و معنای دیگری ندارد", + isSelected: false, + }, + { + id: 4, + sub_id: 10, + choice: "این متنی آزمایشی برای تست این کد و معنای دیگری ندارد", + isSelected: false, + }, + ], + }, + { + id: 11, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 11, + choice: "پاسخ الف", + isSelected: false, + }, + { + id: 2, + sub_id: 11, + choice: "پاسخ ب", + isSelected: false, + }, + { + id: 3, + sub_id: 11, + choice: "پاسخ ج", + isSelected: false, + }, + { + id: 4, + sub_id: 11, + choice: "پاسخ د", + isSelected: false, + }, + ], + }, + { + id: 12, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 12, + choice: "پاسخ الف", + isSelected: false, + }, + { + id: 2, + sub_id: 12, + choice: "پاسخ ب", + isSelected: false, + }, + { + id: 3, + sub_id: 12, + choice: "پاسخ ج", + isSelected: false, + }, + { + id: 4, + sub_id: 12, + choice: "پاسخ د", + isSelected: false, + }, + ], + }, + { + id: 13, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 13, + choice: "پاسخ الف", + isSelected: false, + }, + { + id: 2, + sub_id: 13, + choice: "پاسخ ب", + isSelected: false, + }, + { + id: 3, + sub_id: 13, + choice: "پاسخ ج", + isSelected: false, + }, + { + id: 4, + sub_id: 13, + choice: "پاسخ د", + isSelected: false, + }, + ], + }, + { + id: 14, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 14, + choice: "پاسخ الف", + isSelected: false, + }, + { + id: 2, + sub_id: 14, + choice: "پاسخ ب", + isSelected: false, + }, + { + id: 3, + sub_id: 14, + choice: "پاسخ ج", + isSelected: false, + }, + { + id: 4, + sub_id: 14, + choice: "پاسخ د", + isSelected: false, + }, + ], + }, + { + id: 15, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 15, + choice: "پاسخ الف درست است", + isSelected: false, + }, + { + id: 2, + sub_id: 15, + choice: "پاسخ ب درست است", + isSelected: false, + }, + { + id: 3, + sub_id: 15, + choice: "پاسخ ج درست است", + isSelected: false, + }, + { + id: 4, + sub_id: 15, + choice: "پاسخ د درست است", + isSelected: false, + }, + ], + }, + { + id: 16, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: [ + { + id: 1, + sub_id: 16, + choice: "پاسخ الف درست است", + isSelected: false, + }, + { + id: 2, + sub_id: 16, + choice: "پاسخ ب درست است", + isSelected: false, + }, + { + id: 3, + sub_id: 16, + choice: "پاسخ ج درست است", + isSelected: false, + }, + { + id: 4, + sub_id: 16, + choice: "پاسخ د درست است", + isSelected: false, + }, + ], + }, + { + id: 17, + isActive: false, + question: + "نظر شما نسبت به تحولات جنوب غرب آسیا به ویژه حوزه دریای عمان و خلیج فارس چیست؟", + choices: "", + }, + { + id: 18, + isActive: false, + question: "", + question_img: q_img1, + choices: [ + { + id: 1, + sub_id: 18, + choice: "پاسخ الف درست است", + isSelected: false, + }, + { + id: 2, + sub_id: 18, + choice: "پاسخ ب درست است", + isSelected: false, + }, + { + id: 3, + sub_id: 18, + choice: "پاسخ ج درست است", + isSelected: false, + }, + { + id: 4, + sub_id: 18, + choice: "پاسخ د درست است", + isSelected: false, + }, + ], + }, + ]); + + const state = useSelector((state) => state.default); + let data = [] + for (let y = 0; y < data_list.length; y++) { + if (data_list[y].choices) { + data.push(0); + } else { + data.push(1); + } + } + + + + + + //--answer list------------------------------------------- + let answer_list = []; + for (let i = 0; i < data_list.length; i++) { + answer_list.push(0); + } + // console.log(answer_list); + //--choice-index-list------------------------------------- + let choice_index_counter = 0; + let choice_index_list = []; + for (let i = 0; i < data_list.length; i++) { + choice_index_list.push(choice_index_counter); + for (let j = 0; j < data_list[i].choices.length; j++) { + choice_index_counter++; + } + } + // console.log(choice_index_list); + //--choose a choice setting--and movment----------------------------------------------------- + let visible_circles_number = Math.floor(window.innerWidth / 66.975); + const chooseChoice = (id, sub_id, index) => { + const choices = document.querySelectorAll( + ".M-Exam-main-item-choices-item-text" + ); + const badge_choices = document.querySelectorAll( + ".M-Exam-main-item-choices-item-badge" + ); + const progress_bar_circles = document.querySelectorAll( + ".M-Exam-progress-bar-item-circle" + ); + if (index + 1 > visible_circles_number) { + //movment -------------------------- + let movement = (index + 1 - visible_circles_number) * 66.975; + document.querySelector(".M-Exam-progress-bar").scrollLeft = -movement; + } else { + document.querySelector(".M-Exam-progress-bar").scrollLeft = 0; + } + //------------------------------------------------------------------------ + + if (answer_list[sub_id - 1] !== 0) { + choices[ + choice_index_list[sub_id - 1] + answer_list[sub_id - 1] - 1 + ].style.backgroundColor = "#F5F5F5"; + choices[ + choice_index_list[sub_id - 1] + answer_list[sub_id - 1] - 1 + ].style.color = "#132F52"; + + badge_choices[ + choice_index_list[sub_id - 1] + answer_list[sub_id - 1] - 1 + ].style.backgroundColor = "#E7E7E7"; + badge_choices[ + choice_index_list[sub_id - 1] + answer_list[sub_id - 1] - 1 + ].style.color = "#132F52"; + } + if (answer_list[sub_id - 1] === id) { + progress_bar_circles[sub_id - 1].style.backgroundColor = "#F5F5F5"; + progress_bar_circles[sub_id - 1].style.color = "#A2B4CB"; + answer_list[sub_id - 1] = 0; + // console.log(answer_list); + } else { + choices[choice_index_list[sub_id - 1] + id - 1].style.backgroundColor = + "#74DF2C"; + choices[choice_index_list[sub_id - 1] + id - 1].style.color = "#FFF"; + progress_bar_circles[sub_id - 1].style.backgroundColor = "#74DF2C"; + progress_bar_circles[sub_id - 1].style.color = "#FFF"; + + badge_choices[ + choice_index_list[sub_id - 1] + id - 1 + ].style.backgroundColor = "#63C81F"; + badge_choices[choice_index_list[sub_id - 1] + id - 1].style.color = + "#FFF"; + answer_list[sub_id - 1] = id; + // console.log(answer_list); + } + }; + //------------------------------------------------------------ + const updateProgressBar = (e, id) => { + let progress = document.querySelectorAll( + ".M-Exam-progress-bar-item-circle" + ); + // console.log(e); + if (e.target.value.length > 0) { + progress[id - 1].style.backgroundColor = "#74DF2C"; + progress[id - 1].style.color = "#fff"; + } else { + progress[id - 1].style.backgroundColor = "#F5F5F5"; + progress[id - 1].style.color = "#A2B4CB"; + } + }; + //progress bar movement --------------------------------------- + const moverProgressBar = (index) => { + if (index + 1 > visible_circles_number) { + let movement = (index + 1 - visible_circles_number) * 66.975; + document.querySelector(".M-Exam-progress-bar").scrollLeft = -movement; + } else { + document.querySelector(".M-Exam-progress-bar").scrollLeft = 0; + } + }; + return ( +
+
+
+
+
+
+ title-icon +
+ {data.name} +
+
+
+ +
+ {data.text} +
+
+
+
+ +
+ ساعت 14:41 +
+
+
+
+ clock icon +
زمان باقیمانده :
+
48:29
+
+
+
+ {data_list.map((item, index) => ( +
+
{index + 1}
+
------
+
+ ))} +
+
+ {data_list.map((item, index1) => ( +
+
سوال {index1 + 1}
+ {item.question && ( +
{item.question}
+ )} + {!item.question && ( +
+ تصویر سوال امتحانی +
+ )} +
+ {item.choices && + item.choices.map((item, index) => ( +
chooseChoice(item.id, item.sub_id, index1)} + > +
+ {choice_badge_list[index]} +
+
+ {item.choice} +
+
+ ))} +
+ {!item.choices && ( +
+
+ تشریح پاسخ +
+ +
+ )} +
+
+ ))} +
+
+
+ ذخیره اطلاعات و پایان آزمون +
+
+
+
+
+ ); +}; + +export default M_Exam; diff --git a/src/view/Exam/M_Exam.scss b/src/view/Exam/M_Exam.scss new file mode 100644 index 0000000..1b1356b --- /dev/null +++ b/src/view/Exam/M_Exam.scss @@ -0,0 +1,335 @@ +// @font-face { +// font-family: IRANSansX-Bold; +// src: url(../../../../assets/font/IRANSansX/Webfonts/fonts/woff2/IRANSansX-Bold.woff2) format("woff2"), +// url(../../../../assets/font/IRANSansX/Webfonts/fonts/woff/IRANSansX-Bold.woff) format("woff"); +// } + +// @font-face { +// font-family: IRANSansX-Regular; +// src: url(../../../../assets/font/IRANSansX/Webfonts/fonts/woff2/IRANSansX-Regular.woff2) format("woff2"), +// url(../../../../assets/font/IRANSansX/Webfonts/fonts/woff/IRANSansX-Regular.woff) format("woff"); +// } + +// @font-face { +// font-family: IRANSansXFaNum-Regular; +// src: url(../../../../assets/font/IRANSansX/Farsi-numerals/IRANSansXFaNum-Regular.ttf) format("woff2"), +// url(../../../../assets/font/IRANSansX/Farsi-numerals/Webfonts/Woff/IRANSansXFaNum-Regular.woff) format("woff"); +// } + +// $font1:IRANSansX-Regular; +// $font2:IRANSansX-Bold; +// $font3:IRANSansXFaNum-Regular; + +.M-Exam{ + width: 100vw; + padding: 0 5px; + position: relative; + + .M-Exam-top-cover{ + width: 96%; + height: 200px; + position: fixed; + top: 0; + left: 50%; + transform: translateX(-50%); + background-color: white; + z-index: 4; + } + + .M-Exam-info{ + width: 96%; + padding: 5px 7px; + border-radius: 10px; + border: 2px solid #F1F1F1; + position: fixed; + top: 90px; + left: 50%; + transform: translateX(-50%); + background-color: white; + z-index: 5; + + .M-Exam-info-row1{ + width: 100%; + display: flex; + align-items: flex-start; + justify-content: space-between; + padding: 5px 0; + direction: rtl; + border-bottom: 1px solid #dfdfdf; + + .M-Exam-info-row1-title-and-subtitle-box{ + width: 65%; + + .M-Exam-info-row1-title-box{ + width: 100%; + display: flex; + align-items: flex-start; + direction: rtl; + + .M-Exam-info-row1-title-box-text{ + font-size: 13px; + margin-right: 3px; + // font-family: $font2; + color: #2E81E8; + } + } + + .M-Exam-info-row1-subtitle-box{ + width: 100%; + display: flex; + align-items: flex-start; + direction: rtl; + margin-top: 5px; + + .M-Exam-info-row1-subtitle-box-icon{ + margin-right: 16px; + color: #CEFDFF; + } + .M-Exam-info-row1-subtitle-box-text{ + font-size: 10px; + // font-family: $font1; + color: #132F52; + margin-right: 3px; + } + } + } + + .M-Exam-info-row1-time{ + display: flex; + align-items: center; + padding: 2px 5px; + background-color: #E2EAF4; + direction: rtl; + border-radius: 3px; + + .M-Exam-info-row1-time-icon{ + color: #013273; + } + .M-Exam-info-row1-time-text{ + font-size: 12px; + color: #013273; + margin-right: 3px; + } + } + } + + .M-Exam-info-row2{ + width: 100%; + display: flex; + align-items: center; + justify-content: center; + padding: 5px 0; + direction: rtl; + + .M-Exam-info-row2-text{ + font-size: 14px; + // font-family: $font2; + color: #2E81E8; + margin-right: 5px; + } + .M-Exam-info-row2-timer{ + font-size: 16px; + // font-family: $font2; + color: #2E81E8; + margin-right: 5px; + } + } + } + + &-progress-bar{ + width: 96%; + height: 35px; + overflow-x: scroll; + display: flex; + align-items: center; + position: fixed; + top: 180px; + left: 50%; + transform: translateX(-50%); + direction: rtl; + background-color: white; + z-index: 5; + scroll-behavior: smooth; + + &-item{ + display: flex; + align-items: center; + height: 100%; + flex-shrink:0; + + &-circle{ + width: 35px !important; + height: 35px !important; + border-radius: 50%; + background-color: #F5F5F5; + display: flex; + align-items: center; + justify-content: center; + color: #A2B4CB; + // font-family: $font3; + } + &-line{ + font-size: 16px; + color: #E0E0E0; + } + } + } + + &-main{ + width: 96%; + position: absolute; + top: 220px; + left: 50%; + transform: translateX(-50%); + + &-item{ + width: 100%; + direction: rtl; + margin-top: 15px; + + &-number{ + font-size: 15px; + // font-family: $font3; + color: #132F52; + padding: 2px 5px; + background-color: #E8FCFF; + display: inline; + } + + &-question{ + width: 100%; + font-size: 19px; + color: #132F52; + // font-family: $font1; + margin-top: 5px; + } + + &-question-img{ + width: 100%; + padding: 5px 5px; + border-radius: 5px; + overflow: hidden; + margin-top: 10px; + background-color: #F5F5F5; + + img{ + width: 100%; + height: auto; + } + } + + &-choices{ + width: 100%; + direction: rtl; + + &-item{ + width: 100%; + // height: 40px; + // padding: 10px 0; + display: flex; + margin-top: 10px; + + &-badge{ + width: 13%; + // height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + // font-family: $font2; + color: #132F52; + background-color: #E7E7E7; + padding: 6px 0; + border-radius: 0 5px 5px 0; + } + + &-text{ + width: 100%; + height: 100%; + display: flex; + align-items: center; + font-size: 16px; + color: #132F52; + // font-family: $font1; + background-color: #F5F5F5; + padding: 6px 0; + padding-right: 10px; + border-radius: 5px 0 0 5px; + } + } + } + + &-answer-box{ + width: 100%; + height: 150px; + display: flex; + align-items: center; + margin-top: 10px; + + &-badge{ + height: 100%; + width: 75px; + background-color: #E7E7E7; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + // font-family: $font2; + color: #132F52; + border-radius: 0 5px 5px 0; + text-align: center; + } + + &-input{ + width: 100% !important; + height: 100%; + background-color: #F5F5F5; + border: none !important; + outline: none !important; + border-radius: 5px 0 0 5px; + resize: none; + font-size: 14px; + // font-family: $font1; + padding: 10px 10px; + } + } + &-line{ + width: 100%; + height: 1px; + background-color: #D6E6F9; + margin-top: 20px; + } + } + + &-btn-container{ + width: 100%; + display: flex; + align-items: center; + margin-top: 20px; + margin-bottom: 20px; + + &-line{ + width: 20%; + height: 2px; + background-color: #2E81E8; + } + + &-btn{ + width: 60%; + height: 40px; + border-radius: 7px; + background-color: #2E81E8; + color: white; + font-size: 15px; + color: white; + // font-family: $font1; + display: flex; + align-items: center; + justify-content: center; + } + } + } + +} + + diff --git a/src/view/Exam/index.js b/src/view/Exam/index.js index d0cce72..d489bc3 100644 --- a/src/view/Exam/index.js +++ b/src/view/Exam/index.js @@ -8,6 +8,8 @@ import q_img1 from "../../assets/azmoon-list/exam/amanda-jones-oHVdj31R3F4-unspl import React from "react"; import { Link } from "react-router-dom"; import {state} from '../../components/exam/Carousel/state' +import M_Exam from "./M_Exam"; +import {connect} from 'react-redux' // import img1 from '../../assets/store/amazing-suggest/ella-olsson-KPDbRyFOTnE-unsplash.jpg'; // import img2 from '../../assets/store/amazing-suggest/antoine-dautry-_zsL306fDck-unsplash.jpg'; @@ -19,7 +21,7 @@ let l1 = []; let i = 0; let l2 = []; -const Exam = ({ ID }) => { +const Exam = ({ ID, isMobile }) => { // const state = useSelector((state) => state.default); const [common_data] = useState(state); @@ -845,6 +847,7 @@ const Exam = ({ ID }) => { } return ( + isMobile ? : <> {data_list.map((item) => { if (item.choices) { @@ -1039,5 +1042,17 @@ const Exam = ({ ID }) => { ); }; +const mapStateToProps = (state) => ({ + isDark: state.publicApi.isDark, + isMobile: state.publicApi.isMobile, + headerOptions: state.publicApi.headerOptions, + isLogin: state.user.status, + cartProductsLength: state.userProduct.list?.filter( + (product) => product.condition < 2 + )?.length, +}); -export default Exam; +const mapDispatchToProps = { +}; + +export default connect(mapStateToProps, mapDispatchToProps)(Exam); diff --git a/tailwind.config.js b/tailwind.config.js index 83e5b22..3c39977 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -34,6 +34,7 @@ module.exports = { gray81 : '#818181', gray70 : '#707070', gray37: '#373737', + grayAB: '#a5a8ab', red82OP: 'rgba(223, 20, 82, 0.08)', pinkF5: '#fff1f5', pinkD6 : '#ffd6d6',