diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..295096e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = crlf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..bc77754 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,16 @@ +{ + "useTabs": false, + "printWidth": 90, + "singleQuote": true, + "jsxSingleQuote": true, + "bracketSpacing": true, + "bracketSameLine": false, + "quoteProps": "as-needed", + "arrowParens": "avoid", + "requirePragma": false, + "insertPragma": false, + "trailingComma": "es5", + "semi": true, + "braceStyle": "1tbs", + "editorconfig": true +} diff --git a/next.config.js b/next.config.js index 9785e4d..db64dce 100644 --- a/next.config.js +++ b/next.config.js @@ -7,7 +7,7 @@ const nextConfig = { * Added for GitHub Pages deployment. */ basePath: "/react-learndash", - output: "export", + ...(!process.env.DEPLOY_TO_GITHUB_PAGES ? {output: 'export'} : {}) } module.exports = nextConfig diff --git a/package.json b/package.json index e8e5a21..c4f5511 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 next dev", + "dev2": "set NODE_TLS_REJECT_UNAUTHORIZED=0 && next dev", "build": "next build", "start": "next start", "export": "next build && next export", diff --git a/public/assets/scss/components/_writing-evaluation-form.scss b/public/assets/scss/components/_writing-evaluation-form.scss index 710e7ee..5d99545 100644 --- a/public/assets/scss/components/_writing-evaluation-form.scss +++ b/public/assets/scss/components/_writing-evaluation-form.scss @@ -1,121 +1,229 @@ - .content-box { - background: #eaeaea; - padding: 100px 100px; - margin: -5px 0px 25px -15px; + background: #eaeaea; + padding: 100px 100px; + margin: -5px 0px 25px -15px; } +.incorrect, +.delete { + text-decoration: line-through; + border-bottom: 1px solid #c38181; + color: #d5bbbb !important; + padding: 0 3px; +} -.incorrect, .delete { - text-decoration: line-through; - border-bottom: 2px solid #c38181; - color: #d5bbbb !important; - padding: 0 3px; +.garbled { + // text-decoration: underline; + // text-decoration-style: wavy !important; + // text-decoration-thickness: 1px; + text-decoration-line: grammar-error; + color: #d5baba; } .corrected { - border-bottom: 2px solid #9ec59e; - padding-left: 3px; - font-weight: 600; + border-bottom: 1px solid #9ec59e; + padding-left: 3px; + font-weight: 600; } .space { - background: pink; - border: 1px solid pink; - padding-left: 3px; + background: pink; + border: 1px solid pink; + padding-left: 3px; } .addition { - color: #ff6700; - background: #ffd7b5; - border: 1px solid #ff6700; - padding: 0 3px; + color: #ff6700; + background: #ffd7b5; + border: 1px solid #ff6700; + padding: 0 3px; } .hovertextp { - position: relative; - display: inline-block; - - .hovertext { - &:before { - content: "Feedback: " attr(data-hover); - visibility: hidden; - background-color: rgba(0, 0, 0, 0.8); - color: #fff; - text-align: center; - border-radius: 6px; - padding: 5px 0; /* Position the tooltip */ - position: absolute; - display: block; - z-index: 9999; - top: auto; /* Reset the top property */ - overflow: visible; - width: max-content; - max-width: 200px; - } - - &:hover:before { - opacity: 1; - visibility: visible; + position: relative; + display: inline-block; + + .hovertext { + &:before { + content: 'Feedback: ' attr(data-hover); + visibility: hidden; + background-color: rgba(0, 0, 0, 0.8); + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; /* Position the tooltip */ + position: absolute; + display: block; + z-index: 9999; + top: auto; /* Reset the top property */ + overflow: visible; + width: max-content; + max-width: 200px; + } + + &:hover:before { + opacity: 1; + visibility: visible; + } } - } } - .nopaque { - opacity: 0.2; + opacity: 0.2; } .opaque { - opacity: 1.0; - background: #fff; + opacity: 1; + background: #fff; } - .waf-menu.waf-menu { + li { + padding-top: 10px; + + &:after { + content: ''; + } - li { - padding-top: 10px; + &:hover { + background-color: #f0f0f0; + } - &:after { - content: ''; + li { + padding-top: 0; + margin-top: 0; + } } - &:hover { - background-color: #f0f0f0; + a { + display: block; + cursor: pointer; + padding: 5px; } - li { - padding-top: 0; - margin-top: 0; + ul { + display: none; + list-style-type: none; + padding: 0 0 15px; + margin: 0; + + ul { + padding: 0 0 5px; + } + + &.active { + display: block; + } } - } +} - a { - display: block; - cursor: pointer; - padding: 5px; - } +.waf-textarea { + textarea { + background: #f5f4f4; + } +} - ul { - display: none; - list-style-type: none; - padding: 0 0 15px; - margin: 0; +/*----------- clear theme elements for Writing AI evaluation -------------*/ - ul { - padding: 0 0 5px; +.course-details-content { + max-width: 900px; + margin: 0 auto; + border: 1px solid #eaeaea; + border-radius: 5px; + padding: 0 50px 50px 50px; + box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.05); +} + +.waf-textarea textarea { + border: 1px solid #eaeaea !important; + border-radius: 5px; + height: 300px; + background-color: #fff; +} + +.edu-btn { + margin-top: 30px; +} + +label { + padding-left: 25px; +} + +/* ----------------------------- */ + +.writing-evaluation-form { + textarea[disabled] { + background-color: rgb(240, 240, 240); + cursor: not-allowed; } - &.active { - display: block; + button[disabled] { + filter: saturate(30%); + pointer-events: none; } - } -} + .incorrect, + .deletion { + text-decoration: line-through; + border-bottom: 2px solid #c38181; + color: #d5bbbb !important; + padding: 0 3px 0 0; + display: inline; + } + .correct { + border-bottom: 2px solid #9ec59e; + padding: 0 3px 0 0; + font-weight: 600; + display: inline; + } + .addition { + color: #ff6700; + background: #ffd7b5; + border: 1px solid #ff6700; + padding: 0 3px 0 0; + display: inline; + } + .nochange { + display: inline; + padding: 0 3px 0 0; + } -.waf-textarea { - textarea { - background: #f5f4f4; - } + .feedback { + .tab-wrapper { + display: flex; + margin: 0; + } + + .tabs { + flex-grow: 0; + min-width: 210px; + width: 330px; + border-right: 1px solid #ddd; + } + + .tab-link { + display: block; + padding: 10px; + background-color: #f0f0f0; + border: none; + text-align: left; + cursor: pointer; + width: 100%; + border-bottom: 1px solid #ddd; + } + + .tab-link.active, + .tab-link:hover { + background-color: #ccc; + } + + .tab-content { + flex-grow: 1; + padding: 20px; + } + + .tab:not(.active) { + display: none; + } + } } diff --git a/public/assets/scss/template/_course.scss b/public/assets/scss/template/_course.scss index 1a09cf5..a5a46f2 100644 --- a/public/assets/scss/template/_course.scss +++ b/public/assets/scss/template/_course.scss @@ -1252,7 +1252,7 @@ height: 100%; width: 100%; background: rgb(255,255,255); - background: linear-gradient(top, rgba(51, 51, 51, 0.01) 25%, rgba(51, 51, 51, 0.7) 100%); + background: linear-gradient(to bottom, rgba(51, 51, 51, 0.01) 25%, rgba(51, 51, 51, 0.7) 100%); position: absolute; top: 0; bottom: 0; diff --git a/src/components/abouts/about-1/about-area.jsx b/src/components/abouts/about-1/about-area.jsx deleted file mode 100644 index 1981909..0000000 --- a/src/components/abouts/about-1/about-area.jsx +++ /dev/null @@ -1,74 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -const lists = [ - 'Flexible Classes', - 'Offline Classe Mode', - 'Educator Support' -]; - -const AboutArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-
- About Us -

We Providing The Best Quality Online Courses.

- -

Lorem ipsum dolor sit amet consectur adipiscing elit sed eiusmod ex tempor incididunt labore dolore magna aliquaenim ad minim.

-
-
    - {lists.map((l,i) =>
  • {l}
  • )} -
-
-
-
-
- About Image - About Image -
    - - Shape - - - Shape - - - Shape - -
  • - Shape -
  • -
-
-
-
-
- -
- ) -} - -export default AboutArea; \ No newline at end of file diff --git a/src/components/abouts/about-1/about-area.tsx b/src/components/abouts/about-1/about-area.tsx new file mode 100644 index 0000000..b5332ad --- /dev/null +++ b/src/components/abouts/about-1/about-area.tsx @@ -0,0 +1,149 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +const lists = ['Flexible Classes', 'Offline Classe Mode', 'Educator Support']; + +const AboutArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+
+ About Us +

+ We Providing The{' '} + Best Quality{' '} + Online Courses. +

+ + + +

+ Lorem ipsum dolor sit amet consectur adipiscing elit + sed eiusmod ex tempor incididunt labore dolore magna + aliquaenim ad minim. +

+
+
    + {lists.map((l, i) => ( +
  • {l}
  • + ))} +
+
+
+
+
+ + About Image + + + About Image + +
    + + + Shape + + + + + Shape + + + + + Shape + + +
  • + + Shape + +
  • +
+
+
+
+
+ +
+ ); +}; + +export default AboutArea; diff --git a/src/components/abouts/about-1/brand-area.jsx b/src/components/abouts/about-1/brand-area.jsx deleted file mode 100644 index 9cd317a..0000000 --- a/src/components/abouts/about-1/brand-area.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; - -const brands = [ - '/assets/images/brand/brand-01.png', - '/assets/images/brand/brand-02.png', - '/assets/images/brand/brand-03.png', - '/assets/images/brand/brand-04.png', - '/assets/images/brand/brand-05.png', - '/assets/images/brand/brand-06.png' -] - -const BrandArea = ({about_p_2}) => { - return ( -
-
-
- {brands.map((img, i) => ( -
- Brand Logo -
- ))} -
-
-
- ) -} - -export default BrandArea; \ No newline at end of file diff --git a/src/components/abouts/about-1/brand-area.tsx b/src/components/abouts/about-1/brand-area.tsx new file mode 100644 index 0000000..029806f --- /dev/null +++ b/src/components/abouts/about-1/brand-area.tsx @@ -0,0 +1,38 @@ +import React from 'react'; + +const brands = [ + '/assets/images/brand/brand-01.png', + '/assets/images/brand/brand-02.png', + '/assets/images/brand/brand-03.png', + '/assets/images/brand/brand-04.png', + '/assets/images/brand/brand-05.png', + '/assets/images/brand/brand-06.png', +]; + +type BrandAreaProps = { + about_p_2?: boolean; +}; + +const BrandArea = ({ about_p_2 }: BrandAreaProps) => { + return ( +
+
+
+ {brands.map((img, i) => ( +
+ + Brand Logo + +
+ ))} +
+
+
+ ); +}; + +export default BrandArea; diff --git a/src/components/abouts/about-1/chose-box-item.jsx b/src/components/abouts/about-1/chose-box-item.jsx deleted file mode 100644 index 5fbdf1d..0000000 --- a/src/components/abouts/about-1/chose-box-item.jsx +++ /dev/null @@ -1,15 +0,0 @@ -export default function ChoseBox ({color,icon,title,subtitle}) { - return ( -
-
-
- -
-
-

{title}

-

{subtitle}

-
-
-
- ) -} \ No newline at end of file diff --git a/src/components/abouts/about-1/chose-box-item.tsx b/src/components/abouts/about-1/chose-box-item.tsx new file mode 100644 index 0000000..bd524a3 --- /dev/null +++ b/src/components/abouts/about-1/chose-box-item.tsx @@ -0,0 +1,20 @@ +export default function ChoseBox({ color, icon, title, subtitle }) { + return ( +
+
+
+ +
+
+

{title}

+

{subtitle}

+
+
+
+ ); +} diff --git a/src/components/abouts/about-1/counter-area.jsx b/src/components/abouts/about-1/counter-area.jsx deleted file mode 100644 index 528b068..0000000 --- a/src/components/abouts/about-1/counter-area.jsx +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react'; -import Counter from '../../common/counter'; - -const counter_data = [ - { - color: 'primary-color', - count: 29.3, - icon: '48', - text: 'K', - title: 'Student Enrolled', - decimal: 1 - }, - { - color: 'secondary-color', - count: 32.4, - icon: '47', - text: 'K', - title: 'Class Completed', - decimal: 1 - }, - { - color: 'extra08-color', - count: 100, - icon: '49', - text: '%', - title: 'Satisfaction Rate' - }, - { - color: 'extra05-color', - count: 354, - icon: '50', - text: '%', - title: 'Top Instructors' - } -] - -const CounterArea = ({about_p_3}) => { - return ( -
-
-
- {counter_data.map((c, i) => { - const { color, count, text, title,icon } = c; - return ( -
-
-
- -
-

- - - -

-
{title}
-
-
- ) - })} -
-
- -
- ) -} - -export default CounterArea; \ No newline at end of file diff --git a/src/components/abouts/about-1/counter-area.tsx b/src/components/abouts/about-1/counter-area.tsx new file mode 100644 index 0000000..e3c1eae --- /dev/null +++ b/src/components/abouts/about-1/counter-area.tsx @@ -0,0 +1,108 @@ +import React from 'react'; +import Counter from '../../common/counter'; + +const counter_data: { + color: string; + count: number; + icon: string; + text: string; + title: string; + decimal?: number; +}[] = [ + { + color: 'primary-color', + count: 29.3, + icon: '48', + text: 'K', + title: 'Student Enrolled', + decimal: 1, + }, + { + color: 'secondary-color', + count: 32.4, + icon: '47', + text: 'K', + title: 'Class Completed', + decimal: 1, + }, + { + color: 'extra08-color', + count: 100, + icon: '49', + text: '%', + title: 'Satisfaction Rate', + }, + { + color: 'extra05-color', + count: 354, + icon: '50', + text: '%', + title: 'Top Instructors', + }, +]; + +type CounterAreaProps = { + about_p_3?: boolean; +}; + +const CounterArea = ({ about_p_3 }: CounterAreaProps) => { + return ( +
+
+
+ {counter_data.map((c, i) => { + const { color, count, text, title, icon } = c; + return ( +
+
+
+ +
+

+ + + +

+
{title}
+
+
+ ); + })} +
+
+ +
+ ); +}; + +export default CounterArea; diff --git a/src/components/abouts/about-1/index.jsx b/src/components/abouts/about-1/index.tsx similarity index 63% rename from src/components/abouts/about-1/index.jsx rename to src/components/abouts/about-1/index.tsx index eb77f16..5d85685 100644 --- a/src/components/abouts/about-1/index.jsx +++ b/src/components/abouts/about-1/index.tsx @@ -8,23 +8,25 @@ import BrandArea from './brand-area'; import CounterArea from './counter-area'; import WhyChose from './why-chose'; - const index = () => { return (
-
+
- - - - - - + + + + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/abouts/about-1/why-chose.jsx b/src/components/abouts/about-1/why-chose.jsx deleted file mode 100644 index 374ddce..0000000 --- a/src/components/abouts/about-1/why-chose.jsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import ChoseBox from './chose-box-item'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -const WhyChose = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
- Why choose edublink -

The Best Beneficial Side
of EduBlink

- -
-
- - - - - -
-
    -
  • - -
  • -
-
- -
- ) -} - -export default WhyChose; \ No newline at end of file diff --git a/src/components/abouts/about-1/why-chose.tsx b/src/components/abouts/about-1/why-chose.tsx new file mode 100644 index 0000000..9afb316 --- /dev/null +++ b/src/components/abouts/about-1/why-chose.tsx @@ -0,0 +1,117 @@ +import React from 'react'; +import ChoseBox from './chose-box-item'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +const WhyChose = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+ Why choose edublink +

+ The Best Beneficial Side{' '} +
of EduBlink +

+ + + +
+
+ + + + + +
+
    +
  • + +
  • +
+
+ +
+ ); +}; + +export default WhyChose; diff --git a/src/components/abouts/about-2/counter-area.jsx b/src/components/abouts/about-2/counter-area.jsx deleted file mode 100644 index cb28901..0000000 --- a/src/components/abouts/about-2/counter-area.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import CounterBox from '../../homes/home/counter-box'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -const CounterArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-
- Fun Facts -

The Large Number of Counting

- -

Lorem ipsum dolor sit amet consectur adipiscing elit sed eiusmod tempor incididunt labore dolore magna aliquaenim ad minim.

-
-
-
-
-
- -
    - - Shape - -
  • - Shape -
  • - - Shape - - - Shape - -
-
-
-
-
-
- ) -} - -export default CounterArea; \ No newline at end of file diff --git a/src/components/abouts/about-2/counter-area.tsx b/src/components/abouts/about-2/counter-area.tsx new file mode 100644 index 0000000..1303724 --- /dev/null +++ b/src/components/abouts/about-2/counter-area.tsx @@ -0,0 +1,101 @@ +import React from 'react'; +import CounterBox from '../../homes/home/counter-box'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +const CounterArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+
+ Fun Facts +

+ The Large{' '} + Number of + Counting +

+ + + +

+ Lorem ipsum dolor sit amet consectur adipiscing elit + sed eiusmod tempor incididunt labore dolore magna + aliquaenim ad minim. +

+
+
+
+
+
+ +
    + + + Shape + + +
  • + + Shape + +
  • + + + Shape + + + + + Shape + + +
+
+
+
+
+
+ ); +}; + +export default CounterArea; diff --git a/src/components/abouts/about-2/index.jsx b/src/components/abouts/about-2/index.tsx similarity index 58% rename from src/components/abouts/about-2/index.jsx rename to src/components/abouts/about-2/index.tsx index 43706d1..b13e9d6 100644 --- a/src/components/abouts/about-2/index.jsx +++ b/src/components/abouts/about-2/index.tsx @@ -9,24 +9,26 @@ import BrandArea from '../about-1/brand-area'; import CounterArea from './counter-area'; import WhyChose from './why-chose'; - const index = () => { return (
-
+
- - - - - - - - + + + + + + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/abouts/about-2/team-area.jsx b/src/components/abouts/about-2/team-area.jsx deleted file mode 100644 index 74e8e69..0000000 --- a/src/components/abouts/about-2/team-area.jsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { instructors_data } from '../../../data'; -import TeamFive from "../../team-member/team-five"; - -const TeamArea = () => { - return ( -
-
-
- Instructors -

Course Instructors

- -
- -
- {instructors_data.slice(0,3).map((instructor) => ( -
- -
- ))} -
-
- -
    -
  • - Shape -
  • -
  • - Shape -
  • -
  • - Shape -
  • -
-
- ) -} - -export default TeamArea; \ No newline at end of file diff --git a/src/components/abouts/about-2/team-area.tsx b/src/components/abouts/about-2/team-area.tsx new file mode 100644 index 0000000..c5024ae --- /dev/null +++ b/src/components/abouts/about-2/team-area.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import { instructors_data } from '../../../data'; +import TeamFive from '../../team-member/team-five'; + +const TeamArea = () => { + return ( +
+
+
+ Instructors +

Course Instructors

+ + + +
+ +
+ {instructors_data.slice(0, 3).map(instructor => ( +
+ +
+ ))} +
+
+ +
    +
  • + + Shape + +
  • +
  • + + Shape + +
  • +
  • + + Shape + +
  • +
+
+ ); +}; + +export default TeamArea; diff --git a/src/components/abouts/about-2/why-chose.jsx b/src/components/abouts/about-2/why-chose.jsx deleted file mode 100644 index fb70744..0000000 --- a/src/components/abouts/about-2/why-chose.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import React from 'react'; -import ChoseBox from '../about-1/chose-box-item'; -import { motion, useScroll, useTransform } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -const WhyChose = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - const { scrollYProgress } = useScroll(); - const y = useTransform(scrollYProgress, [0, 1], [0, 1000]); - return ( -
-
-
-
-
-

We Providing The
Best Quality Online Courses

- -
-
-

Lorem ipsum dolor sit amet cons etur adipisicing elit sed do eiusm aut tempor incididunt labore dolore magna aliqua quis nostrud ex ertation lamcolab oris aliquip.

-
-
-
- -
- - - - - -
-
-
    - - - - - shape - -
  • - -
  • -
-
- ) -} - -export default WhyChose; \ No newline at end of file diff --git a/src/components/abouts/about-2/why-chose.tsx b/src/components/abouts/about-2/why-chose.tsx new file mode 100644 index 0000000..5f33be8 --- /dev/null +++ b/src/components/abouts/about-2/why-chose.tsx @@ -0,0 +1,96 @@ +import React from 'react'; +import ChoseBox from '../about-1/chose-box-item'; +import { motion, useScroll, useTransform } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +const WhyChose = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + const { scrollYProgress } = useScroll(); + const y = useTransform(scrollYProgress, [0, 1], [0, 1000]); + return ( +
+
+
+
+
+

+ We Providing The
Best{' '} + Quality Online {' '} + Courses +

+ + + +
+
+

+ Lorem ipsum dolor sit amet cons etur adipisicing elit sed + do eiusm aut tempor incididunt labore dolore magna aliqua + quis nostrud ex ertation lamcolab oris aliquip. +

+
+
+
+ +
+ + + + + +
+
+
    + + + + + + shape + + +
  • + +
  • +
+
+ ); +}; + +export default WhyChose; diff --git a/src/components/abouts/about-3/about-us-area.jsx b/src/components/abouts/about-3/about-us-area.jsx deleted file mode 100644 index 4b4574c..0000000 --- a/src/components/abouts/about-3/about-us-area.jsx +++ /dev/null @@ -1,102 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -// MissionItem -function MissionItem({ color, icon, title, text }) { - return ( -
-
-
-

{title}

-

{text}

-
-
- ) -} - -const AboutUsArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-
- About Us -

We Provide Best Education Services For You.

- -

Magna aliquaenim ad minim veniam quis nostrud exercitation ullamco laborisLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius tempor incididunt labore.

-
-
- - -
-
-
- -
-
- -
    - - Shape Images - - - Shape Images - - - Shape Images - - - - -
-
-
-
-
-
- ) -} - -export default AboutUsArea; \ No newline at end of file diff --git a/src/components/abouts/about-3/about-us-area.tsx b/src/components/abouts/about-3/about-us-area.tsx new file mode 100644 index 0000000..4983fe9 --- /dev/null +++ b/src/components/abouts/about-3/about-us-area.tsx @@ -0,0 +1,206 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +// MissionItem +function MissionItem({ color, icon, title, text }) { + return ( +
+
+ +
+
+

{title}

+

{text}

+
+
+ ); +} + +const AboutUsArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+
+ About Us +

+ We Provide Best{' '} + Education{' '} + Services For You. +

+ + + +

+ Magna aliquaenim ad minim veniam quis nostrud + exercitation ullamco laborisLorem ipsum dolor sit + amet, consectetur adipisicing elit, sed do eius tempor + incididunt labore. +

+
+
+ + +
+
+
+ +
+
+ +
    + + + Shape Images + + + + + Shape Images + + + + + Shape Images + + + + + +
+
+
+
+
+
+ ); +}; + +export default AboutUsArea; diff --git a/src/components/abouts/about-3/counter-area.jsx b/src/components/abouts/about-3/counter-area.jsx deleted file mode 100644 index d766c44..0000000 --- a/src/components/abouts/about-3/counter-area.jsx +++ /dev/null @@ -1,80 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; -import Counter from '../../common/counter'; - -const counter_data = [ - { - color: 'primary-color', - count: 29.3, - icon: '48', - text: 'K', - title: 'Student Enrolled', - decimal: 1 - }, - { - color: 'secondary-color', - count: 32.4, - icon: '47', - text: 'K', - title: 'Class Completed', - decimal: 1 - }, - { - color: 'extra08-color', - count: 100, - icon: '49', - text: '%', - title: 'Satisfaction Rate' - }, - { - color: 'extra05-color', - count: 354, - icon: '50', - text: '%', - title: 'Top Instructors' - } -] - -const CounterArea = ({about_p_3}) => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
- {counter_data.map((c, i) => { - const { color, count, text, title,icon } = c; - return ( -
-
-
- -
-

- - - -

-
{title}
-
-
- ) - })} -
- -
    - - Shape - -
-
-
- ) -} - -export default CounterArea; \ No newline at end of file diff --git a/src/components/abouts/about-3/counter-area.tsx b/src/components/abouts/about-3/counter-area.tsx new file mode 100644 index 0000000..f897c0c --- /dev/null +++ b/src/components/abouts/about-3/counter-area.tsx @@ -0,0 +1,103 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; +import Counter from '../../common/counter'; + +const counter_data: { + color: string; + count: number; + icon: string; + text: string; + title: string; + decimal?: number; +}[] = [ + { + color: 'primary-color', + count: 29.3, + icon: '48', + text: 'K', + title: 'Student Enrolled', + decimal: 1, + }, + { + color: 'secondary-color', + count: 32.4, + icon: '47', + text: 'K', + title: 'Class Completed', + decimal: 1, + }, + { + color: 'extra08-color', + count: 100, + icon: '49', + text: '%', + title: 'Satisfaction Rate', + }, + { + color: 'extra05-color', + count: 354, + icon: '50', + text: '%', + title: 'Top Instructors', + }, +]; + +const CounterArea = ({ about_p_3 }) => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+ {counter_data.map((c, i) => { + const { color, count, text, title, icon } = c; + return ( +
+
+
+ +
+

+ + + +

+
{title}
+
+
+ ); + })} +
+ +
    + + + Shape + + +
+
+
+ ); +}; + +export default CounterArea; diff --git a/src/components/abouts/about-3/index.jsx b/src/components/abouts/about-3/index.tsx similarity index 69% rename from src/components/abouts/about-3/index.jsx rename to src/components/abouts/about-3/index.tsx index 9413fa5..f155cb9 100644 --- a/src/components/abouts/about-3/index.jsx +++ b/src/components/abouts/about-3/index.tsx @@ -11,19 +11,19 @@ import WhyChose from './why-chose'; const index = () => { return (
-
+
- - + + - - - - + + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/abouts/about-3/team-area.jsx b/src/components/abouts/about-3/team-area.jsx deleted file mode 100644 index d71e3de..0000000 --- a/src/components/abouts/about-3/team-area.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { instructors_data } from '../../../data'; -import TeamThree from "../../team-member/team-three"; - -const TeamArea = () => { - return ( -
-
-
- Instructors -

Course Instructors

- -
- -
- {instructors_data.slice(0,3).map((instructor) => ( -
- -
- ))} -
-
-
- ) -} - -export default TeamArea; \ No newline at end of file diff --git a/src/components/abouts/about-3/team-area.tsx b/src/components/abouts/about-3/team-area.tsx new file mode 100644 index 0000000..f4ebacb --- /dev/null +++ b/src/components/abouts/about-3/team-area.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import { instructors_data } from '../../../data'; +import TeamThree from '../../team-member/team-three'; + +const TeamArea = () => { + return ( +
+
+
+ Instructors +

Course Instructors

+ + + +
+ +
+ {instructors_data.slice(0, 3).map(instructor => ( +
+ +
+ ))} +
+
+
+ ); +}; + +export default TeamArea; diff --git a/src/components/abouts/about-3/testimonial-area.jsx b/src/components/abouts/about-3/testimonial-area.jsx deleted file mode 100644 index 2a47f42..0000000 --- a/src/components/abouts/about-3/testimonial-area.jsx +++ /dev/null @@ -1,150 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { Swiper, SwiperSlide } from "swiper/react"; -import { Autoplay, Pagination } from "swiper"; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; -import VideoModal from '../../common/popup-modal/video-modal'; -import useModal from '../../../hooks/use-modal'; - -const contents = { - pre_title: 'Testimonials', - title: <>What Our Students
Have To Say, - testimonials: [ - { - ratings: [1, 2, 3, 4, 5], - desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', - author: '/assets/images/testimonial/testimonial-01.png', - name: 'Haley Bennet', - title: 'Designer' - }, - { - ratings: [1, 2, 3, 4, 5], - desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', - author: '/assets/images/testimonial/testimonial-02.png', - name: 'Richard Gere', - title: 'Developer' - }, - { - ratings: [1, 2, 3, 4, 5], - desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', - author: '/assets/images/testimonial/testimonial-03.png', - name: 'Megan Foxx', - title: 'Designer' - } - ], - video_title: 'Take a Video Tour to Learn Intro of Campus', - video_id: 'PICj5tr9hcc' -} - -const { pre_title, testimonials, title,video_id,video_title } = contents; - -const TestimonialArea = () => { - const [loop, setLoop] = useState(false); - useEffect(() => setLoop(true), []); - const { isVideoOpen, setIsVideoOpen } = useModal(); - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( - <> -
-
-
-
-
- {pre_title} -

{title}

- -
- - - {testimonials.map((item, i) => { - const { author, desc, name, ratings, title } = item; - return ( - -
-
-
- {ratings.map(r => )} -
-

{desc}

-
-
- Testimonial -
-
-
{name}
- {title} -
-
-
-
-
- ) - })} -
-
-
- -
-
-
- Thumb - -
-
-

{video_title}

-
-
-
-
-
    - - Shape - - - - -
-
-
    -
  • - Shape -
  • -
-
- - {/* video modal start */} - - {/* video modal end */} - - ) -} - -export default TestimonialArea; \ No newline at end of file diff --git a/src/components/abouts/about-3/testimonial-area.tsx b/src/components/abouts/about-3/testimonial-area.tsx new file mode 100644 index 0000000..f52b239 --- /dev/null +++ b/src/components/abouts/about-3/testimonial-area.tsx @@ -0,0 +1,216 @@ +import React, { useEffect, useState } from 'react'; +import { Swiper, SwiperSlide } from 'swiper/react'; +import { Autoplay, Pagination } from 'swiper'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; +import VideoModal from '../../common/popup-modal/video-modal'; +import useModal from '../../../hooks/use-modal'; + +const contents = { + pre_title: 'Testimonials', + title: ( + <> + What Our Students
Have To Say + + ), + testimonials: [ + { + ratings: [1, 2, 3, 4, 5], + desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', + author: '/assets/images/testimonial/testimonial-01.png', + name: 'Haley Bennet', + title: 'Designer', + }, + { + ratings: [1, 2, 3, 4, 5], + desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', + author: '/assets/images/testimonial/testimonial-02.png', + name: 'Richard Gere', + title: 'Developer', + }, + { + ratings: [1, 2, 3, 4, 5], + desc: '“Lorem ipsum dolor amet consectur elit adicing elit sed do umod tempor ux incididunt enim ad minim veniam quis sit nosrud citation laboris nisiste aliquip comodo perspiatix une omnis iste natus error sit voluptatem accusantium dolore que laudantum”.', + author: '/assets/images/testimonial/testimonial-03.png', + name: 'Megan Foxx', + title: 'Designer', + }, + ], + video_title: 'Take a Video Tour to Learn Intro of Campus', + video_id: 'PICj5tr9hcc', +}; + +const { pre_title, testimonials, title, video_id, video_title } = contents; + +const TestimonialArea = () => { + const [loop, setLoop] = useState(false); + useEffect(() => setLoop(true), []); + const { isVideoOpen, setIsVideoOpen } = useModal(); + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( + <> +
+
+
+
+
+ {pre_title} +

{title}

+ + + +
+ + + {testimonials.map((item, i) => { + const { author, desc, name, ratings, title } = item; + return ( + +
+
+
+ {ratings.map(r => ( + + ))} +
+

{desc}

+
+
+ + Testimonial + +
+
+
+ {name} +
+ + {title} + +
+
+
+
+
+ ); + })} +
+
+
+ +
+
+
+ + Thumb + + +
+
+

{video_title}

+
+
+
+
+
    + + + Shape + + + + + +
+
+
    +
  • + + Shape + +
  • +
+
+ + {/* video modal start */} + + {/* video modal end */} + + ); +}; + +export default TestimonialArea; diff --git a/src/components/abouts/about-3/why-chose.jsx b/src/components/abouts/about-3/why-chose.jsx deleted file mode 100644 index 7f54f7d..0000000 --- a/src/components/abouts/about-3/why-chose.jsx +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; - -function FeatureBox({ img, color, title, icon, text }) { - return ( -
-
-
- why choose image -
-
-
- -
-

{title}

-

{text}

-
-
-
- ) -} - -const WhyChose = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
- Why choose edublink -

The Best Beneficial Side
of EduBlink

- -
-
- - - - - -
-
    -
  • - shape -
  • - - - -
  • - -
  • -
-
-
- ) -} - -export default WhyChose; \ No newline at end of file diff --git a/src/components/abouts/about-3/why-chose.tsx b/src/components/abouts/about-3/why-chose.tsx new file mode 100644 index 0000000..c6e88fc --- /dev/null +++ b/src/components/abouts/about-3/why-chose.tsx @@ -0,0 +1,120 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../../contexts/mouse-move-context'; + +function FeatureBox({ img, color, title, icon, text }) { + return ( +
+
+
+ + why choose image + +
+
+
+ +
+

{title}

+

{text}

+
+
+
+ ); +} + +const WhyChose = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+ Why choose edublink +

+ The Best Beneficial Side{' '} +
of EduBlink +

+ + + +
+
+ + + + + +
+
    +
  • + + shape + +
  • + + + +
  • + +
  • +
+
+
+ ); +}; + +export default WhyChose; diff --git a/src/components/blog-details/blog-details-area.jsx b/src/components/blog-details/blog-details-area.jsx deleted file mode 100644 index 2e59a7d..0000000 --- a/src/components/blog-details/blog-details-area.jsx +++ /dev/null @@ -1,168 +0,0 @@ -import React from 'react'; -import BlogSidebar from '../blog/blog-sidebar'; -import BlogCommentForm from '../forms/blog-comment-form'; -import CommentArea from './comment-area'; - -const BlogDetailsArea = ({blog}) => { - return ( -
-
-
-
-
-
- Developer -

{blog?.title}

-
    -
  • {blog?.date}
  • -
  • Com {blog?.comment}
  • -
-
- Blog Image -
-
- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor inc idid unt ut labore et dolore magna aliqua enim ad minim veniam, quis nostrud exerec tation ullamco laboris nis aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequuntur magni dolores.

- -

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

-
    -
  • Aute irure dolor in reprehenderit
  • -
  • Occaecat cupidatat non proident sunt in culpa
  • -
  • Pariatur enim ipsam.
  • -
- -
-

Lorem ipsum dolor amet con sectur elitadicing elit sed do usmod tempor uincididunt enim minim veniam nostrud.

-
Simon Baker
-
- -

The Complete Camtasia

-

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

- -
-
-
-
- Features Images -
-
-
-
- Features Images -
-
-
-
- -

Consectetur adipisicing elit, sed do eiusmod tempor inc idid unt ut labore et dolore magna aliqua enim ad minim veniam, quis nostrud exerec tation ullamco laboris nis aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequuntur magni dolores.

- -

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

- -

Intrinsic Motivation

-

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

- -
    -
  • Aute irure dolor in reprehenderit
  • -
  • Occaecat cupidatat non proident sunt in culpa
  • -
  • Pariatur enim ipsam.
  • -
- -
-
-
-
-
Tags:
-
- Language - eLearn - Tips -
-
-
- -
-
-
Share on:
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
- -
-
- Author Images -
-
-
Edward Norton
-

Enim ad minim veniam quis nostrud exercitation lamco laboris nisi ex commodo consequat aute irure.

-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
- - - - {/* Start Comment Area */} - - {/* End Comment Area */} -
-

Leave Your Comment Here

- {/* form start */} - - {/* form end */} -
-
- -
- {/* sidebar start */} - - {/* sidebar end */} -
-
-
-
- ) -} - -export default BlogDetailsArea; \ No newline at end of file diff --git a/src/components/blog-details/blog-details-area.tsx b/src/components/blog-details/blog-details-area.tsx new file mode 100644 index 0000000..9ad7fa1 --- /dev/null +++ b/src/components/blog-details/blog-details-area.tsx @@ -0,0 +1,254 @@ +import React from 'react'; +import BlogSidebar from '../blog/blog-sidebar'; +import BlogCommentForm from '../forms/blog-comment-form'; +import CommentArea from './comment-area'; + +const BlogDetailsArea = ({ blog }) => { + return ( +
+
+
+
+
+
+ Developer +

{blog?.title}

+
    +
  • + + {blog?.date} +
  • +
  • + Com {blog?.comment} +
  • +
+
+ + Blog Image + +
+
+ +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor inc idid unt ut labore et dolore + magna aliqua enim ad minim veniam, quis nostrud exerec + tation ullamco laboris nis aliquip commodo consequat. Duis + aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur enim ipsam + voluptatem quia voluptas sit aspernatur aut odit aut fugit + sed quia consequuntur magni dolores.{' '} +

+ +

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. Sed + ut perspiciatis unde omnis iste natus error sit voluptatem + accusantium doloremque laudantium totam rem aperiam. +

+
    +
  • Aute irure dolor in reprehenderit
  • +
  • Occaecat cupidatat non proident sunt in culpa
  • +
  • Pariatur enim ipsam.
  • +
+ +
+

+ Lorem ipsum dolor amet con sectur elitadicing elit sed + do usmod tempor uincididunt enim minim veniam nostrud. +

+
Simon Baker
+
+ +

The Complete Camtasia

+

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. Sed + ut perspiciatis unde omnis iste natus error sit voluptatem + accusantium doloremque laudantium totam rem aperiam.{' '} +

+ +
+
+
+
+ + Features Images + +
+
+
+
+ + Features Images + +
+
+
+
+ +

+ Consectetur adipisicing elit, sed do eiusmod tempor inc + idid unt ut labore et dolore magna aliqua enim ad minim + veniam, quis nostrud exerec tation ullamco laboris nis + aliquip commodo consequat. Duis aute irure dolor in + reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur enim ipsam voluptatem quia voluptas + sit aspernatur aut odit aut fugit sed quia consequuntur + magni dolores.{' '} +

+ +

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. Sed + ut perspiciatis unde omnis iste natus error sit voluptatem + accusantium doloremque laudantium totam rem aperiam. +

+ +

Intrinsic Motivation

+

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. Sed + ut perspiciatis unde omnis iste natus error sit voluptatem + accusantium doloremque laudantium totam rem aperiam.{' '} +

+ +
    +
  • Aute irure dolor in reprehenderit
  • +
  • Occaecat cupidatat non proident sunt in culpa
  • +
  • Pariatur enim ipsam.
  • +
+ +
+
+
+
+
Tags:
+
+ Language + eLearn + Tips +
+
+
+ +
+
+
Share on:
+ +
+
+
+
+
+ +
+
+ + Author Images + +
+
+
Edward Norton
+

+ Enim ad minim veniam quis nostrud exercitation lamco + laboris nisi ex commodo consequat aute irure. +

+ +
+
+ + + + {/* Start Comment Area */} + + {/* End Comment Area */} +
+

Leave Your Comment Here

+ {/* form start */} + + {/* form end */} +
+
+ +
+ {/* sidebar start */} + + {/* sidebar end */} +
+
+
+
+ ); +}; + +export default BlogDetailsArea; diff --git a/src/components/blog-details/comment-area.jsx b/src/components/blog-details/comment-area.jsx deleted file mode 100644 index 3699507..0000000 --- a/src/components/blog-details/comment-area.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; - -const CommentArea = () => { - return ( -
-

Comments

-
-
-
- Comment Images -
-
-
Haley Bennet
- Oct 10, 2021 -

Lorem ipsum dolor sit amet, consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- Reply -
-
-
- -
-
- Comment Images -
-
-
Simon Baker
- Oct 10, 2021 -

Lorem ipsum dolor sit amet, consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- Reply -
-
-
- -
-
- Comment Images -
-
-
Richard Gere
- Oct 10, 2021 -

Lorem ipsum dolor sit amet, consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- Reply -
-
-
-
-
- ) -} - -export default CommentArea; \ No newline at end of file diff --git a/src/components/blog-details/comment-area.tsx b/src/components/blog-details/comment-area.tsx new file mode 100644 index 0000000..0fbb916 --- /dev/null +++ b/src/components/blog-details/comment-area.tsx @@ -0,0 +1,84 @@ +import React from 'react'; + +const CommentArea = () => { + return ( +
+

Comments

+
+
+
+ + Comment Images + +
+
+
Haley Bennet
+ Oct 10, 2021 +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. +

+ +
+
+ +
+
+ + Comment Images + +
+
+
Simon Baker
+ Oct 10, 2021 +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. +

+ +
+
+ +
+
+ + Comment Images + +
+
+
Richard Gere
+ Oct 10, 2021 +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. +

+ +
+
+
+
+ ); +}; + +export default CommentArea; diff --git a/src/components/blog-details/index.jsx b/src/components/blog-details/index.tsx similarity index 61% rename from src/components/blog-details/index.jsx rename to src/components/blog-details/index.tsx index 81c21b7..f8bab6b 100644 --- a/src/components/blog-details/index.jsx +++ b/src/components/blog-details/index.tsx @@ -4,19 +4,18 @@ import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import AdBanner from '../homes/home/ad-banner'; import BlogDetailsArea from './blog-details-area'; - -const index = ({blog}) => { +const index = ({ blog }) => { return (
-
+
- - - + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/blog-list/index.jsx b/src/components/blog-list/index.tsx similarity index 75% rename from src/components/blog-list/index.jsx rename to src/components/blog-list/index.tsx index cb3b412..5e1ae39 100644 --- a/src/components/blog-list/index.jsx +++ b/src/components/blog-list/index.tsx @@ -7,15 +7,15 @@ import ListArea from './list-area'; const index = () => { return (
-
+
- +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/blog-list/list-area.jsx b/src/components/blog-list/list-area.jsx deleted file mode 100644 index 407233e..0000000 --- a/src/components/blog-list/list-area.jsx +++ /dev/null @@ -1,67 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { blog_data } from '../../data'; -import PaginationTwo from '../../ui/paginatio-2'; -import BlogSidebar from '../blog/blog-sidebar'; - -const blog_items = blog_data.filter(blog => blog.blog_list); - -const ListArea = () => { - return ( -
-
-
-
- {blog_items.map((blog) => { - const { id, img, title, date, desc, comment } = blog; - return ( -
-
-
- - - Blog Images - - -
-
-
- - {title}... - -
-
    -
  • {date}
  • -
  • Com {comment}
  • -
-

{desc}

-
- - Learn More - -
-
-
-
- ); - })} - -
    - {/* pagination start */} - - {/* pagination end */} -
-
- -
- {/* sidebar start */} - - {/* sidebar end */} -
-
-
-
- ); -} - -export default ListArea; \ No newline at end of file diff --git a/src/components/blog-list/list-area.tsx b/src/components/blog-list/list-area.tsx new file mode 100644 index 0000000..d1c23f1 --- /dev/null +++ b/src/components/blog-list/list-area.tsx @@ -0,0 +1,82 @@ +import Link from 'next/link'; +import React from 'react'; +import { blog_data } from '../../data'; +import PaginationTwo from '../../ui/paginatio-2'; +import BlogSidebar from '../blog/blog-sidebar'; + +const blog_items = blog_data.filter(blog => blog.blog_list); + +const ListArea = () => { + return ( +
+
+
+
+ {blog_items.map(blog => { + const { id, img, title, date, desc, comment } = blog; + return ( +
+
+
+ + + Blog Images + + +
+
+
+ + {title}... + +
+
    +
  • + + {date} +
  • +
  • + Com{' '} + {comment} +
  • +
+

{desc}

+
+ + Learn More + +
+
+
+
+ ); + })} + +
    + {/* pagination start */} + + {/* pagination end */} +
+
+ +
+ {/* sidebar start */} + + {/* sidebar end */} +
+
+
+
+ ); +}; + +export default ListArea; diff --git a/src/components/blog-masonry/blog-masonry-area.jsx b/src/components/blog-masonry/blog-masonry-area.jsx deleted file mode 100644 index 0879ad3..0000000 --- a/src/components/blog-masonry/blog-masonry-area.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import Masonry, { ResponsiveMasonry } from "react-responsive-masonry"; -import { blog_data } from '../../data'; -import PaginationTwo from '../../ui/paginatio-2'; - -const blog_items = blog_data.filter(blog => blog.blog_masonry); - -const BlogMasonryArea = () => { - return ( -
-
- -
    - {/* pagination start */} - - {/* pagination end */} -
-
-
- ); -} - -export default BlogMasonryArea; \ No newline at end of file diff --git a/src/components/blog-masonry/blog-masonry-area.tsx b/src/components/blog-masonry/blog-masonry-area.tsx new file mode 100644 index 0000000..c2a164e --- /dev/null +++ b/src/components/blog-masonry/blog-masonry-area.tsx @@ -0,0 +1,94 @@ +import Link from 'next/link'; +import React from 'react'; +import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry'; +import { blog_data } from '../../data'; +import PaginationTwo from '../../ui/paginatio-2'; + +const blog_items = blog_data.filter(blog => blog.blog_masonry); + +const BlogMasonryArea = () => { + return ( +
+
+ +
    + {/* pagination start */} + + {/* pagination end */} +
+
+
+ ); +}; + +export default BlogMasonryArea; diff --git a/src/components/blog-masonry/index.jsx b/src/components/blog-masonry/index.tsx similarity index 66% rename from src/components/blog-masonry/index.jsx rename to src/components/blog-masonry/index.tsx index 7ed4ce4..e8bcea1 100644 --- a/src/components/blog-masonry/index.jsx +++ b/src/components/blog-masonry/index.tsx @@ -7,15 +7,15 @@ import BlogMasonryArea from './blog-masonry-area'; const index = () => { return (
-
+
- - - + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/blog-post/blog-post-one.jsx b/src/components/blog-post/blog-post-one.jsx deleted file mode 100644 index cbbc167..0000000 --- a/src/components/blog-post/blog-post-one.jsx +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const BlogPostOne = ({ param }) => { - return ( -
-
-
- - - Blog Images - - -
-
-
- - - - - -
- -
- - {param.title} - -
-
    -
  • - {param.date} -
  • -
  • - Com {param.comment} -
  • -
-

{param.sm_desc}

-
-
-
- ); -} - -export default BlogPostOne; \ No newline at end of file diff --git a/src/components/blog-post/blog-post-one.tsx b/src/components/blog-post/blog-post-one.tsx new file mode 100644 index 0000000..2137578 --- /dev/null +++ b/src/components/blog-post/blog-post-one.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import Link from 'next/link'; + +const BlogPostOne = ({ param }) => { + return ( +
+
+
+ + + Blog Images + + +
+
+
+ + + +
+ +
+ {param.title} +
+
    +
  • + + {param.date} +
  • +
  • + Com {param.comment} +
  • +
+

{param.sm_desc}

+
+
+
+ ); +}; + +export default BlogPostOne; diff --git a/src/components/blog/blog-area.jsx b/src/components/blog/blog-area.jsx deleted file mode 100644 index b69710a..0000000 --- a/src/components/blog/blog-area.jsx +++ /dev/null @@ -1,129 +0,0 @@ -import React from 'react'; -import { useState } from 'react'; -import { useEffect } from 'react'; -import { Swiper, SwiperSlide } from 'swiper/react'; -import { Autoplay, Navigation } from 'swiper'; - -import { blog_data } from '../../data'; -import BlogSidebar from './blog-sidebar'; -import VideoModal from '../common/popup-modal/video-modal'; -import useModal from '../../hooks/use-modal'; -import PaginationTwo from '../../ui/paginatio-2'; -import Link from 'next/link'; - -const blog_items = blog_data.filter(blog => blog.blog_standard) - -const BlogArea = () => { - const [loop, setLoop] = useState(false); - useEffect(() => setLoop(true), []); - const { isVideoOpen, setIsVideoOpen } = useModal(); - return <> -
-
-
-
- {blog_items.map((blog, i) => { - const { category, comment, date, id, title, images, img, video, slider, desc } = blog; - return ( -
-
-
- {!slider && - - - Blog Images - - - } - - {video && } - - {slider && - - {images.map((img, i) => ( - - - - Blog Images - - - - ))} - -
-
- -
-
- -
-
-
- } -
- -
- -

- - {title} - -

-
    -
  • {date}
  • -
  • Com {comment}
  • -
-

{desc}

-
- - Learn More - -
-
-
-
- ); - })} - -
    - {/* pagination start */} - - {/* pagination end */} -
-
- -
- {/* sidebar start */} - - {/* sidebar end */} -
-
-
-
- - {/* video modal start */} - - {/* video modal end */} - ; -} - -export default BlogArea; \ No newline at end of file diff --git a/src/components/blog/blog-area.tsx b/src/components/blog/blog-area.tsx new file mode 100644 index 0000000..2e581cf --- /dev/null +++ b/src/components/blog/blog-area.tsx @@ -0,0 +1,192 @@ +import React from 'react'; +import { useState } from 'react'; +import { useEffect } from 'react'; +import { Swiper, SwiperSlide } from 'swiper/react'; +import { Autoplay, Navigation } from 'swiper'; + +import { blog_data } from '../../data'; +import BlogSidebar from './blog-sidebar'; +import VideoModal from '../common/popup-modal/video-modal'; +import useModal from '../../hooks/use-modal'; +import PaginationTwo from '../../ui/paginatio-2'; +import Link from 'next/link'; + +const blog_items = blog_data.filter(blog => blog.blog_standard); + +const BlogArea = () => { + const [loop, setLoop] = useState(false); + useEffect(() => setLoop(true), []); + const { isVideoOpen, setIsVideoOpen } = useModal(); + return ( + <> +
+
+
+
+ {blog_items.map((blog, i) => { + const { + category, + comment, + date, + id, + title, + images, + img, + video, + slider, + desc, + } = blog; + return ( +
+
+
+ {!slider && ( + + + Blog Images + + + )} + + {video && ( + + )} + + {slider && ( + + {images.map((img, i) => ( + + + + Blog Images + + + + ))} + +
+
+ +
+
+ +
+
+
+ )} +
+ +
+ +

+ + {title} + +

+
    +
  • + + {date} +
  • +
  • + Com{' '} + {comment} +
  • +
+

{desc}

+
+ + Learn More + + +
+
+
+
+ ); + })} + +
    + {/* pagination start */} + + {/* pagination end */} +
+
+ +
+ {/* sidebar start */} + + {/* sidebar end */} +
+
+
+
+ + {/* video modal start */} + + {/* video modal end */} + + ); +}; + +export default BlogArea; diff --git a/src/components/blog/blog-sidebar.jsx b/src/components/blog/blog-sidebar.jsx deleted file mode 100644 index 9d74558..0000000 --- a/src/components/blog/blog-sidebar.jsx +++ /dev/null @@ -1,109 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { blog_data } from '../../data'; - -const latest_blog = blog_data.slice(0, 3); - -const BlogSidebar = () => { - return ( -
-
-
-

Search

-
-
e.preventDefault()}> - - -
-
-
-
- -
-
-

Latest Post

-
- {latest_blog.map((blog) => ( -
-
- - - Blog Images - - -
-
-
- - {blog.title.substring(0, 25)}... - -
-
    -
  • {blog.date}
  • -
-
-
- ))} -
-
-
- - - -
-
-

Get Online Courses From EduBlink

- -

Nostrud exer ciation laboris aliqup

- Start Now -
-
- - - -
-
-

Tags

- -
-
-
- ); -} - -export default BlogSidebar; \ No newline at end of file diff --git a/src/components/blog/blog-sidebar.tsx b/src/components/blog/blog-sidebar.tsx new file mode 100644 index 0000000..b4cfe6e --- /dev/null +++ b/src/components/blog/blog-sidebar.tsx @@ -0,0 +1,164 @@ +import Link from 'next/link'; +import React from 'react'; +import { blog_data } from '../../data'; + +const latest_blog = blog_data.slice(0, 3); + +const BlogSidebar = () => { + return ( +
+
+
+

Search

+
+
e.preventDefault()}> + + +
+
+
+
+ +
+
+

Latest Post

+
+ {latest_blog.map(blog => ( +
+
+ + + Blog Images + + +
+
+
+ + {blog.title.substring(0, 25)}... + +
+
    +
  • + + {blog.date} +
  • +
+
+
+ ))} +
+
+
+ + + +
+
+

+ Get Online Courses From EduBlink +

+ + + +

Nostrud exer ciation laboris aliqup

+ + Start Now + +
+
+ + + +
+
+

Tags

+ +
+
+
+ ); +}; + +export default BlogSidebar; diff --git a/src/components/blog/index.jsx b/src/components/blog/index.tsx similarity index 66% rename from src/components/blog/index.jsx rename to src/components/blog/index.tsx index 7653fd9..9f658dc 100644 --- a/src/components/blog/index.jsx +++ b/src/components/blog/index.tsx @@ -7,15 +7,15 @@ import BlogArea from './blog-area'; const index = () => { return (
-
+
- - - + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/breadcrumb/breadcrumb-2.jsx b/src/components/breadcrumb/breadcrumb-2.jsx deleted file mode 100644 index 8f3fa49..0000000 --- a/src/components/breadcrumb/breadcrumb-2.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; - -const BreadcrumbTwo = ({ subtitle }) => { - return ( -
-
-
-
    -
  • - - Home - -
  • -
  • -
  • Pages
  • -
  • -
  • {subtitle}
  • -
-
-
-
- ); -} - -export default BreadcrumbTwo; \ No newline at end of file diff --git a/src/components/breadcrumb/breadcrumb-2.tsx b/src/components/breadcrumb/breadcrumb-2.tsx new file mode 100644 index 0000000..b4fe062 --- /dev/null +++ b/src/components/breadcrumb/breadcrumb-2.tsx @@ -0,0 +1,32 @@ +import Link from 'next/link'; +import React from 'react'; + +const BreadcrumbTwo = ({ subtitle }) => { + return ( +
+
+
+
    +
  • + Home +
  • +
  • + +
  • +
  • + Pages +
  • +
  • + +
  • +
  • + {subtitle} +
  • +
+
+
+
+ ); +}; + +export default BreadcrumbTwo; diff --git a/src/components/breadcrumb/breadcrumb-3.jsx b/src/components/breadcrumb/breadcrumb-3.jsx deleted file mode 100644 index bb4a82d..0000000 --- a/src/components/breadcrumb/breadcrumb-3.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; - -const BreadcrumbThree = ({ title, subtitle }) => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-

{title}

-
-
    -
  • - - Home - -
  • -
  • -
  • Pages
  • -
  • -
  • {subtitle}
  • -
-
-
-
    -
  • - -
  • - - shape - - shape -
  • - -
  • - - shape - -
-
- ); -} - -export default BreadcrumbThree; \ No newline at end of file diff --git a/src/components/breadcrumb/breadcrumb-3.tsx b/src/components/breadcrumb/breadcrumb-3.tsx new file mode 100644 index 0000000..ec42cfd --- /dev/null +++ b/src/components/breadcrumb/breadcrumb-3.tsx @@ -0,0 +1,79 @@ +import Link from 'next/link'; +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; + +const BreadcrumbThree = ({ title, subtitle }) => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+

{title}

+
+
    +
  • + Home +
  • +
  • + +
  • +
  • + Pages +
  • +
  • + +
  • +
  • + {subtitle} +
  • +
+
+
+
    +
  • + +
  • + + + shape + + + + + shape + + +
  • + +
  • + + + shape + + +
+
+ ); +}; + +export default BreadcrumbThree; diff --git a/src/components/breadcrumb/breadcrumb-4.jsx b/src/components/breadcrumb/breadcrumb-4.jsx deleted file mode 100644 index 975f363..0000000 --- a/src/components/breadcrumb/breadcrumb-4.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; - -const BreadcrumbFour = ({title,date,time,city}) => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
- DEVELOPER -

{title}

-
-
    -
  • {date}
  • -
  • {time}
  • -
  • {city}
  • -
-
-
- -
    -
  • - -
  • - - shape - - shape -
  • - -
  • - - shape - -
-
- ) -} - -export default BreadcrumbFour; \ No newline at end of file diff --git a/src/components/breadcrumb/breadcrumb-4.tsx b/src/components/breadcrumb/breadcrumb-4.tsx new file mode 100644 index 0000000..cc7dd54 --- /dev/null +++ b/src/components/breadcrumb/breadcrumb-4.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; + +const BreadcrumbFour = ({ title, date, time, city }) => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+ DEVELOPER +

{title}

+
+
    +
  • + + {date} +
  • +
  • + + {time} +
  • +
  • + + {city} +
  • +
+
+
+ +
    +
  • + +
  • + + + shape + + + + + shape + + +
  • + +
  • + + + shape + + +
+
+ ); +}; + +export default BreadcrumbFour; diff --git a/src/components/breadcrumb/breadcrumb-5.jsx b/src/components/breadcrumb/breadcrumb-5.jsx deleted file mode 100644 index a9c374d..0000000 --- a/src/components/breadcrumb/breadcrumb-5.jsx +++ /dev/null @@ -1,83 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; - -const CourseBreadcrumb = ({ course, subtitle }) => { - const { title, instructor, language, rating_count } = course || {}; - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
    -
  • - - Home - -
  • -
  • -
  • - - Courses - -
  • -
  • -
  • {subtitle}
  • -
-
-

{title}

-
-
    -
  • by {instructor}
  • -
  • {language}
  • -
  • -
    - - - - - -
    - ({rating_count} Rating) -
  • -
-
-
-
    -
  • - -
  • - - shape - - - shape - -
  • - -
  • - - shape - -
-
- ); -} - -export default CourseBreadcrumb; diff --git a/src/components/breadcrumb/breadcrumb-5.tsx b/src/components/breadcrumb/breadcrumb-5.tsx new file mode 100644 index 0000000..b12d8bb --- /dev/null +++ b/src/components/breadcrumb/breadcrumb-5.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; + +const CourseBreadcrumb = ({ course, subtitle }) => { + const { title, instructor, language, rating_count } = course || {}; + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
    +
  • + Home +
  • +
  • + +
  • +
  • + Courses +
  • +
  • + +
  • +
  • + {subtitle} +
  • +
+
+

{title}

+
+
    +
  • + by {instructor} +
  • +
  • + + {language} +
  • +
  • +
    + + + + + +
    + ({rating_count} Rating) +
  • +
+
+
+
    +
  • + +
  • + + + shape + + + + + shape + + +
  • + +
  • + + + shape + + +
+
+ ); +}; + +export default CourseBreadcrumb; diff --git a/src/components/breadcrumb/breadcrumb-6.jsx b/src/components/breadcrumb/breadcrumb-6.jsx deleted file mode 100644 index 6b1c2d4..0000000 --- a/src/components/breadcrumb/breadcrumb-6.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; - -const BreadcrumbSix = ({ title, page }) => { - return ( -
-
-
-
-

{title}

-
-
    -
  • - - Home - -
  • -
  • -
  • Pages
  • -
  • -
  • {page}
  • -
-
-
-
- ); -} - -export default BreadcrumbSix; \ No newline at end of file diff --git a/src/components/breadcrumb/breadcrumb-6.tsx b/src/components/breadcrumb/breadcrumb-6.tsx new file mode 100644 index 0000000..f872eed --- /dev/null +++ b/src/components/breadcrumb/breadcrumb-6.tsx @@ -0,0 +1,35 @@ +import Link from 'next/link'; +import React from 'react'; + +const BreadcrumbSix = ({ title, page }) => { + return ( +
+
+
+
+

{title}

+
+
    +
  • + Home +
  • +
  • + +
  • +
  • + Pages +
  • +
  • + +
  • +
  • + {page} +
  • +
+
+
+
+ ); +}; + +export default BreadcrumbSix; diff --git a/src/components/breadcrumb/breadcrumb.jsx b/src/components/breadcrumb/breadcrumb.jsx deleted file mode 100644 index c022320..0000000 --- a/src/components/breadcrumb/breadcrumb.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; - -const Breadcrumb = ({ title, current_page }) => { - return ( -
-
-
-
-

{title}

-
-
    -
  • - - Home - -
  • -
  • -
  • Pages
  • -
  • -
  • {current_page}
  • -
-
-
-
- ); -} - -export default Breadcrumb; \ No newline at end of file diff --git a/src/components/breadcrumb/breadcrumb.tsx b/src/components/breadcrumb/breadcrumb.tsx new file mode 100644 index 0000000..ff7469f --- /dev/null +++ b/src/components/breadcrumb/breadcrumb.tsx @@ -0,0 +1,35 @@ +import Link from 'next/link'; +import React from 'react'; + +const Breadcrumb = ({ title, current_page }) => { + return ( +
+
+
+
+

{title}

+
+
    +
  • + Home +
  • +
  • + +
  • +
  • + Pages +
  • +
  • + +
  • +
  • + {current_page} +
  • +
+
+
+
+ ); +}; + +export default Breadcrumb; diff --git a/src/components/cart/cart-area.jsx b/src/components/cart/cart-area.jsx deleted file mode 100644 index 0b6c16f..0000000 --- a/src/components/cart/cart-area.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { clear_cart } from '../../redux/features/cart-slice'; -import CartItem from './cart-item'; -import OrderSummery from './order-summery'; - -const CartArea = () => { - const { cartCourses } = useSelector(state => state.cart); - const dispatch = useDispatch(); - return ( -
- {cartCourses.length === 0 && -
-

No Cart Items

-
- - - Return to Courses - - -
-
- } - {cartCourses.length > 0 && -
-
- - - - - - - - - - - - - {cartCourses.map((item, i) => )} - -
Product NamePriceQuantitySubtotal
-
- - - -
-
- -
-
-
- } -
- ); -} - -export default CartArea; \ No newline at end of file diff --git a/src/components/cart/cart-area.tsx b/src/components/cart/cart-area.tsx new file mode 100644 index 0000000..ed3db53 --- /dev/null +++ b/src/components/cart/cart-area.tsx @@ -0,0 +1,87 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { clear_cart } from '../../redux/features/cart-slice'; +import CartItem from './cart-item'; +import OrderSummery from './order-summery'; +import { AppDispatch, AppState } from '../../redux/store'; + +const CartArea = () => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch: AppDispatch = useDispatch(); + return ( +
+ {cartCourses.length === 0 && ( +
+

No Cart Items

+
+ + Return to Courses + +
+
+ )} + {cartCourses.length > 0 && ( +
+
+ + + + + + + + + + + + + {cartCourses.map((item, i) => ( + + ))} + +
+ Product Name + + Price + + Quantity + + Subtotal +
+
+ + + +
+
+ +
+
+
+ )} +
+ ); +}; + +export default CartArea; diff --git a/src/components/cart/cart-item.jsx b/src/components/cart/cart-item.jsx deleted file mode 100644 index 62b51b2..0000000 --- a/src/components/cart/cart-item.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch } from 'react-redux'; -import { cart_course, decrease_quantity, remove_cart_course } from '../../redux/features/cart-slice'; - -const CartItem = ({ item }) => { - const dispatch = useDispatch(); - const handleChange = (e) => {} - return ( - - dispatch(remove_cart_course(item))}> - - - - - - - Books - - - - - - - {item.title} - - - - - ${item.price} - - - -
- dispatch(decrease_quantity(item))}>- - - dispatch(cart_course(item))}>+ -
- - - - ${(item.quantity * item.price).toFixed(2)} - - - ); -} - -export default CartItem; \ No newline at end of file diff --git a/src/components/cart/cart-item.tsx b/src/components/cart/cart-item.tsx new file mode 100644 index 0000000..dff7356 --- /dev/null +++ b/src/components/cart/cart-item.tsx @@ -0,0 +1,67 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch } from 'react-redux'; +import { + cart_course, + decrease_quantity, + remove_cart_course, +} from '../../redux/features/cart-slice'; + +const CartItem = ({ item }) => { + const dispatch = useDispatch(); + const handleChange = e => {}; + return ( + + dispatch(remove_cart_course(item))} + > + + + + + + + + + Books + + + + + + {item.title} + + + + $ + {item.price} + + + +
+ dispatch(decrease_quantity(item))} + > + - + + + dispatch(cart_course(item))} + > + + + +
+ + + + $ + {(item.quantity * item.price).toFixed(2)} + + + ); +}; + +export default CartItem; diff --git a/src/components/cart/index.jsx b/src/components/cart/index.tsx similarity index 66% rename from src/components/cart/index.jsx rename to src/components/cart/index.tsx index a5a2e65..6aa6bea 100644 --- a/src/components/cart/index.jsx +++ b/src/components/cart/index.tsx @@ -6,14 +6,14 @@ import CartArea from './cart-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/cart/order-summery.jsx b/src/components/cart/order-summery.jsx deleted file mode 100644 index e621287..0000000 --- a/src/components/cart/order-summery.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import useCartInfo from '../../hooks/use-cart-info'; - -const OrderSummery = () => { - const { total } = useCartInfo(); - return ( -
-

Cart Totals

- - - - - - - - - - - -
Subtotal${(total).toFixed(2)}
Order Total${(total).toFixed(2)}
- - Process to Checkout - -
- ); -} - -export default OrderSummery; \ No newline at end of file diff --git a/src/components/cart/order-summery.tsx b/src/components/cart/order-summery.tsx new file mode 100644 index 0000000..79fb1bc --- /dev/null +++ b/src/components/cart/order-summery.tsx @@ -0,0 +1,29 @@ +import Link from 'next/link'; +import React from 'react'; +import useCartInfo from '../../hooks/use-cart-info'; + +const OrderSummery = () => { + const { total } = useCartInfo(); + return ( +
+

Cart Totals

+ + + + + + + + + + + +
Subtotal${total.toFixed(2)}
Order Total${total.toFixed(2)}
+ + Process to Checkout + +
+ ); +}; + +export default OrderSummery; diff --git a/src/components/checkout/checkout-area.jsx b/src/components/checkout/checkout-area.jsx deleted file mode 100644 index c502329..0000000 --- a/src/components/checkout/checkout-area.jsx +++ /dev/null @@ -1,145 +0,0 @@ -import React from 'react'; -import { useState } from 'react'; -import OrderPayment from './order-payment'; -import OrderSummery from './order-summery'; - -const countries = [ - 'Select Option', - 'Australia', - 'England', - 'New Zealand', - 'Switzerland', - 'United Kindom (UK)', - 'United States (USA)' -]; - -const CheckoutArea = () => { - const [isOpen, setIsOpen] = useState(false); - return ( -
-
-
-
-
-
Have a coupon? - setIsOpen(!isOpen)} className="toggle-btn"> - Click here to enter your code - -
- {isOpen && -
-

If you have a coupon code, please apply it below.

-
- -
- -
-
-
- } -
-
- -
-
-
-

Billing Details

-
-
-
- - -
-
- -
-
- - -
-
-
- -
- - -
- -
- - -
- -
-
-
- - -
-
- -
-
- - -
-
-
- -
- - - -
- -
- - -
- -
-
-
- - -
-
- -
-
- - -
-
-
- -
-
- - -
-
- -
- - -
-
-
- -
- - -
-
-
-
-
- ) -} - -export default CheckoutArea; \ No newline at end of file diff --git a/src/components/checkout/checkout-area.tsx b/src/components/checkout/checkout-area.tsx new file mode 100644 index 0000000..5d8bd1f --- /dev/null +++ b/src/components/checkout/checkout-area.tsx @@ -0,0 +1,175 @@ +import React from 'react'; +import { useState } from 'react'; +import OrderPayment from './order-payment'; +import OrderSummery from './order-summery'; + +const countries = [ + 'Select Option', + 'Australia', + 'England', + 'New Zealand', + 'Switzerland', + 'United Kindom (UK)', + 'United States (USA)', +]; + +const CheckoutArea = () => { + const [isOpen, setIsOpen] = useState(false); + return ( +
+
+
+
+
+
+ {' '} + Have a coupon? + setIsOpen(!isOpen)} + className='toggle-btn' + > + Click here to enter your code + +
+ {isOpen && ( +
+

+ If you have a coupon code, please apply it below. +

+
+ +
+ +
+
+
+ )} +
+
+ +
+
+
+

Billing Details

+
+
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+ + +
+ +
+ + +
+ +
+
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+ + + +
+ +
+ + +
+ +
+
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+
+ ); +}; + +export default CheckoutArea; diff --git a/src/components/checkout/index.jsx b/src/components/checkout/index.tsx similarity index 66% rename from src/components/checkout/index.jsx rename to src/components/checkout/index.tsx index ea0f39d..1b91b4a 100644 --- a/src/components/checkout/index.jsx +++ b/src/components/checkout/index.tsx @@ -6,14 +6,14 @@ import CheckoutArea from './checkout-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/checkout/order-payment.jsx b/src/components/checkout/order-payment.jsx deleted file mode 100644 index eedb5d6..0000000 --- a/src/components/checkout/order-payment.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; - -const OrderPayment = () => { - return ( -
-

Payment

-
-
-
- - -
-

Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.

-
- -
-
- - - What is Paypal? -
-
-
- - Place Your order -
- ) -} - -export default OrderPayment; \ No newline at end of file diff --git a/src/components/checkout/order-payment.tsx b/src/components/checkout/order-payment.tsx new file mode 100644 index 0000000..da46d58 --- /dev/null +++ b/src/components/checkout/order-payment.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + +const OrderPayment = () => { + return ( +
+

Payment

+
+
+
+ + +
+

+ Please send a check to Store Name, Store Street, Store Town, Store + State / County, Store Postcode. +

+
+ +
+
+ + + What is Paypal? +
+
+
+ + + Place Your order + +
+ ); +}; + +export default OrderPayment; diff --git a/src/components/checkout/order-summery.jsx b/src/components/checkout/order-summery.jsx deleted file mode 100644 index 859c92f..0000000 --- a/src/components/checkout/order-summery.jsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { useSelector } from 'react-redux'; -import useCartInfo from '../../hooks/use-cart-info'; - -const OrderSummery = () => { - const {cartCourses} = useSelector(state => state.cart); - const {total} = useCartInfo(); - return ( -
-
-

Your Orders

- {cartCourses.length === 0 && -
-

No cart items

-
- } - - {cartCourses.length > 0 && - - - {cartCourses.map((item,i) => ( - - - - - ))} - - - - - -
{item.title.substring(0,20)}... x {item.quantity}${item.price}
Order Total${total}
- } -
-
- ) -} - -export default OrderSummery; \ No newline at end of file diff --git a/src/components/checkout/order-summery.tsx b/src/components/checkout/order-summery.tsx new file mode 100644 index 0000000..044226a --- /dev/null +++ b/src/components/checkout/order-summery.tsx @@ -0,0 +1,45 @@ +import React from 'react'; +import { useSelector } from 'react-redux'; +import useCartInfo from '../../hooks/use-cart-info'; +import { AppState } from '../../redux/store'; + +const OrderSummery = () => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const { total } = useCartInfo(); + return ( +
+
+

Your Orders

+ {cartCourses.length === 0 && ( +
+

No cart items

+
+ )} + + {cartCourses.length > 0 && ( + + + {cartCourses.map((item, i) => ( + + + + + ))} + + + + + +
+ {item.title.substring(0, 20)}...{' '} + + x {item.quantity} + + ${item.price}
Order Total${total}
+ )} +
+
+ ); +}; + +export default OrderSummery; diff --git a/src/components/common/counter.jsx b/src/components/common/counter.jsx deleted file mode 100644 index a8603fa..0000000 --- a/src/components/common/counter.jsx +++ /dev/null @@ -1,41 +0,0 @@ -import { useState } from 'react'; -import { InView } from 'react-intersection-observer'; -import CountUp from 'react-countup'; - -const Counter = ( { number, text, add_style=true, decimal } ) => { - const [focus, setFocus] = useState( false ); - const visibleChangeHandler = ( isVisible ) => { - if ( isVisible ) { - if ( ! focus ) { - setFocus( true ); - } - } - } - - return ( - <> - - { ( { countUpRef } ) => ( -
- - - visibleChangeHandler( inView ) - } - > - { text && { text }} - -
- ) } -
- - ) -} - -export default Counter; \ No newline at end of file diff --git a/src/components/common/counter.tsx b/src/components/common/counter.tsx new file mode 100644 index 0000000..b6120f6 --- /dev/null +++ b/src/components/common/counter.tsx @@ -0,0 +1,50 @@ +import { useState } from 'react'; +import { InView } from 'react-intersection-observer'; +import CountUp from 'react-countup'; + +type CounterProps = { + number: number; + text: string; + add_style?: boolean; + decimal?: number; +}; + +const Counter = ({ number, text, add_style = true, decimal }: CounterProps) => { + const [focus, setFocus] = useState(false); + const visibleChangeHandler = isVisible => { + if (isVisible) { + if (!focus) { + setFocus(true); + } + } + }; + + return ( + <> + + {({ countUpRef }) => ( +
+ + visibleChangeHandler(inView)} + > + {text && {text}} + +
+ )} +
+ + ); +}; + +export default Counter; diff --git a/src/components/common/popup-modal/image-lightbox.jsx b/src/components/common/popup-modal/image-lightbox.tsx similarity index 52% rename from src/components/common/popup-modal/image-lightbox.jsx rename to src/components/common/popup-modal/image-lightbox.tsx index f5ac9bc..365292e 100644 --- a/src/components/common/popup-modal/image-lightbox.jsx +++ b/src/components/common/popup-modal/image-lightbox.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Lightbox from 'react-image-lightbox'; -const ImageLightBox = ({images,open,setOpen,photoIndex,setPhotoIndex}) => { +const ImageLightBox = ({ images, open, setOpen, photoIndex, setPhotoIndex }) => { return ( <> {open && ( @@ -10,12 +10,16 @@ const ImageLightBox = ({images,open,setOpen,photoIndex,setPhotoIndex}) => { nextSrc={images[(photoIndex + 1) % images.length]} prevSrc={images[(photoIndex + images.length - 1) % images.length]} onCloseRequest={() => setOpen(false)} - onMovePrevRequest={() => setPhotoIndex((photoIndex + images.length - 1) % images.length)} - onMoveNextRequest={() => setPhotoIndex((photoIndex + 1) % images.length)} + onMovePrevRequest={() => + setPhotoIndex((photoIndex + images.length - 1) % images.length) + } + onMoveNextRequest={() => + setPhotoIndex((photoIndex + 1) % images.length) + } /> )} - ) -} + ); +}; -export default ImageLightBox; \ No newline at end of file +export default ImageLightBox; diff --git a/src/components/common/popup-modal/search-popup.jsx b/src/components/common/popup-modal/search-popup.jsx deleted file mode 100644 index af12691..0000000 --- a/src/components/common/popup-modal/search-popup.jsx +++ /dev/null @@ -1,27 +0,0 @@ - -const SearchPopup = ({isSearchOpen,setIsSearchOpen}) => { - const handleSubmit = e => { - e.preventDefault(); - } - return ( -
-
-
- logo - logo -
-
setIsSearchOpen(false)}> - -
-
-
- - -
-
-
-
- ) -} - -export default SearchPopup; \ No newline at end of file diff --git a/src/components/common/popup-modal/search-popup.tsx b/src/components/common/popup-modal/search-popup.tsx new file mode 100644 index 0000000..0e699d0 --- /dev/null +++ b/src/components/common/popup-modal/search-popup.tsx @@ -0,0 +1,46 @@ +const SearchPopup = ({ isSearchOpen, setIsSearchOpen }) => { + const handleSubmit = e => { + e.preventDefault(); + }; + return ( +
+
+
+ + logo + + + logo + +
+
setIsSearchOpen(false)}> + +
+
+
+ + +
+
+
+
+ ); +}; + +export default SearchPopup; diff --git a/src/components/common/popup-modal/video-modal.jsx b/src/components/common/popup-modal/video-modal.jsx deleted file mode 100644 index 16bf685..0000000 --- a/src/components/common/popup-modal/video-modal.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import ModalVideo from 'react-modal-video'; - -const VideoModal = ({isVideoOpen,setIsVideoOpen,videoId = "9Y7ma241N8k"}) => { - return ( - setIsVideoOpen(false)} - /> - ) -} - -export default VideoModal; \ No newline at end of file diff --git a/src/components/common/popup-modal/video-modal.tsx b/src/components/common/popup-modal/video-modal.tsx new file mode 100644 index 0000000..bbfb6ca --- /dev/null +++ b/src/components/common/popup-modal/video-modal.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import ModalVideo from 'react-modal-video'; + +const VideoModal = ({ isVideoOpen, setIsVideoOpen, videoId = '9Y7ma241N8k' }) => { + return ( + setIsVideoOpen(false)} + /> + ); +}; + +export default VideoModal; diff --git a/src/components/common/preloader.jsx b/src/components/common/preloader.jsx deleted file mode 100644 index ac8b570..0000000 --- a/src/components/common/preloader.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const Preloader = () => { - return ( - - ) -} - -export default Preloader; \ No newline at end of file diff --git a/src/components/common/preloader.tsx b/src/components/common/preloader.tsx new file mode 100644 index 0000000..189b758 --- /dev/null +++ b/src/components/common/preloader.tsx @@ -0,0 +1,14 @@ +import React from 'react'; + +const Preloader = () => { + return ( + + ); +}; + +export default Preloader; diff --git a/src/components/common/sidebar/blog-sidebar-1.jsx b/src/components/common/sidebar/blog-sidebar-1.jsx deleted file mode 100644 index 649577f..0000000 --- a/src/components/common/sidebar/blog-sidebar-1.jsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; - -const SidebarOne = () => { - return ( -
-
-
-

Search

-
-
- - -
-
-
-
- -
-
-

Tags

- -
-
- - - -
-
-

Get Online Courses From EduBlink

- -

Nostrud exer ciation laboris aliqup

- Start Now -
-
-
- ) -} - -export default SidebarOne; \ No newline at end of file diff --git a/src/components/common/sidebar/blog-sidebar-1.tsx b/src/components/common/sidebar/blog-sidebar-1.tsx new file mode 100644 index 0000000..32db5e2 --- /dev/null +++ b/src/components/common/sidebar/blog-sidebar-1.tsx @@ -0,0 +1,93 @@ +import React from 'react'; + +const SidebarOne = () => { + return ( +
+
+
+

Search

+
+
+ + +
+
+
+
+ +
+
+

Tags

+ +
+
+ + + +
+
+

+ Get Online Courses From EduBlink +

+ + + +

Nostrud exer ciation laboris aliqup

+ + Start Now + +
+
+
+ ); +}; + +export default SidebarOne; diff --git a/src/components/common/sidebar/course-details-sidebar.jsx b/src/components/common/sidebar/course-details-sidebar.jsx deleted file mode 100644 index 318f268..0000000 --- a/src/components/common/sidebar/course-details-sidebar.jsx +++ /dev/null @@ -1,86 +0,0 @@ -import React from 'react'; -import useModal from '../../../hooks/use-modal'; -import { Books } from '../../../svg'; -import VideoModal from '../popup-modal/video-modal'; - -const CourseDetailsSidebar = ({ course,details_2=false }) => { - const { img, certificate, videoId, course_price, instructor, duration, student, language } = course || {}; - const { isVideoOpen, setIsVideoOpen } = useModal(); - return ( - <> -
-
-
- -
-

Course Includes:

-
    -
  • - Price: - ${course_price} -
  • - -
  • - Instrutor: - {instructor} -
  • - -
  • - Duration: - {duration} -
  • - -
  • - - - Lessons: - 8 -
  • - -
  • - Enrolled: - {student} students -
  • - -
  • - Language: - {language} -
  • - -
  • - Certificate: - {certificate} -
  • -
- - - -
-

Share On:

-
    -
  • -
  • -
  • -
  • -
-
-
-
-
-
- - {/* video modal start */} - - {/* video modal end */} - - ) -} - -export default CourseDetailsSidebar; \ No newline at end of file diff --git a/src/components/common/sidebar/course-details-sidebar.tsx b/src/components/common/sidebar/course-details-sidebar.tsx new file mode 100644 index 0000000..37f540a --- /dev/null +++ b/src/components/common/sidebar/course-details-sidebar.tsx @@ -0,0 +1,141 @@ +import React from 'react'; +import useModal from '../../../hooks/use-modal'; +import { Books } from '../../../svg'; +import VideoModal from '../popup-modal/video-modal'; + +const CourseDetailsSidebar = ({ course, details_2 = false }) => { + const { + img, + certificate, + videoId, + course_price, + instructor, + duration, + student, + language, + } = course || {}; + const { isVideoOpen, setIsVideoOpen } = useModal(); + return ( + <> +
+
+
+ +
+

Course Includes:

+
    +
  • + + Price: + + ${course_price} +
  • + +
  • + + Instrutor: + + {instructor} +
  • + +
  • + + Duration: + + {duration} +
  • + +
  • + + + Lessons: + + 8 +
  • + +
  • + + Enrolled: + + {student} students +
  • + +
  • + + Language: + + {language} +
  • + +
  • + + Certificate: + + {certificate} +
  • +
+ + + +
+

Share On:

+ +
+
+
+
+
+ + {/* video modal start */} + + {/* video modal end */} + + ); +}; + +export default CourseDetailsSidebar; diff --git a/src/components/common/sidebar/course-sidebar-2.jsx b/src/components/common/sidebar/course-sidebar-2.jsx deleted file mode 100644 index 3257c0d..0000000 --- a/src/components/common/sidebar/course-sidebar-2.jsx +++ /dev/null @@ -1,172 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import Slider from 'react-rangeslider'; -import 'react-rangeslider/lib/index.css'; -import { useDispatch, useSelector } from 'react-redux'; -import { course_data } from '../../../data'; -import { add_category, add_force_page, add_instructor, add_item_offset, add_language, add_level, add_price, reset_filter } - from '../../../redux/features/filter-slice'; - -const courses = course_data.filter((arr, index, self) => - index === self.findIndex((i) => (i.img === arr.img && i.State === arr.State)) -); - -const max_prices = courses.map(item => Number(item.course_price)) -const maxPrice = Math.max(...max_prices); -const minPrice = Math.min(...max_prices); - -const all_categories = [...new Set(courses.map(course => course.category))]; -const all_instructors = [...new Set(courses.map(course => course.instructor))]; -const all_levels = [...new Set(courses.map(course => course.level))]; -const all_languages = [...new Set(courses.map(course => course.language))]; - -const CourseSidebarTwo = ({ course_items }) => { - const [price, setPrice] = useState(maxPrice); - const [showCategory,setShowCategory] = useState(true); - const [showLevel,setShowLevel] = useState(true); - const [showInstructor,setShowInstructor] = useState(true); - const [showLanguage,setShowLanguage] = useState(true); - const { categories,instructors, levels, languages } = useSelector(state => state.filter); - const dispatch = useDispatch(); - - // handleCategory - const handleCategory = (cate) => { - const index = categories.findIndex(item => item === cate); - if (index >= 0) { - dispatch(add_category({ changeType: 'remove', item: cate,maxPrice })) - } - else { - dispatch(add_category({ changeType: 'added', item: cate,maxPrice })) - } - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - // handleInstructor - const handleInstructor = (instructor) => { - dispatch(add_instructor({instructor,maxPrice})) - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - // handleLevel - const handleLevel = (level) => { - dispatch(add_level({level,maxPrice})) - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - // handleLanguage - const handleLanguage = (language) => { - dispatch(add_language({language,maxPrice})) - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - // handlePrice - useEffect(() => { - dispatch(add_price(price)) - }, [dispatch, price]) - - // handlePriceChange - const handlePriceChange = value => { - setPrice(value); - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - return ( -
-
-
-
setShowCategory(!showCategory)}>Categories
- -
- {all_categories.map((c, i) => ( -
- handleCategory(c)} type="checkbox" checked={categories.includes(c)} - id={`cat-check${i + 1}`} readOnly /> - -
- ))} -
-
-
- -
-
-
setShowInstructor(!showInstructor)}>Instructor
- -
- {all_instructors.map((instructor, i) => ( -
- handleInstructor(instructor)} checked={instructors.includes(instructor)} - type="checkbox" id={`cat-check-2${i + 1}`} readOnly /> - -
- ))} -
-
-
- -
-
-
setShowLevel(!showLevel)}>Level
- -
- {all_levels.map((level, i) => ( -
- handleLevel(level)} checked={levels.includes(level)} - type="checkbox" id={`cat-check-3${i + 1}`} readOnly /> - -
- ))} -
-
-
- -
-
-
setShowLanguage(!showLanguage)}>Language
- -
- {all_languages.map((language, i) => ( -
- handleLanguage(language)} checked={languages.includes(language)} - type="checkbox" id={`cat-check-4${i + 1}`} readOnly /> - -
- ))} -
-
-
- -
-
Price Filter
- handlePriceChange(val)} - /> -
Price: ${minPrice} - ${price}
-
- -
-
Reset Filter
- -
-
- ) -} - -export default CourseSidebarTwo; \ No newline at end of file diff --git a/src/components/common/sidebar/course-sidebar-2.tsx b/src/components/common/sidebar/course-sidebar-2.tsx new file mode 100644 index 0000000..ca011a8 --- /dev/null +++ b/src/components/common/sidebar/course-sidebar-2.tsx @@ -0,0 +1,285 @@ +import React, { useEffect, useState } from 'react'; +import Slider from 'react-rangeslider'; +import 'react-rangeslider/lib/index.css'; +import { useDispatch, useSelector } from 'react-redux'; +import { course_data } from '../../../data'; +import { + add_category, + add_force_page, + add_instructor, + add_item_offset, + add_language, + add_level, + add_price, + reset_filter, +} from '../../../redux/features/filter-slice'; +import { AppState } from '../../../redux/store'; + +const courses = course_data.filter( + (arr, index, self) => index === self.findIndex(i => i.img === arr.img) // && i.State === arr.State) +); + +const max_prices = courses.map(item => Number(item.course_price)); +const maxPrice = Math.max(...max_prices); +const minPrice = Math.min(...max_prices); + +const all_categories = [...new Set(courses.map(course => course.category))]; +const all_instructors = [...new Set(courses.map(course => course.instructor))]; +const all_levels = [...new Set(courses.map(course => course.level))]; +const all_languages = [...new Set(courses.map(course => course.language))]; + +const CourseSidebarTwo = ({ course_items }) => { + const [price, setPrice] = useState(maxPrice); + const [showCategory, setShowCategory] = useState(true); + const [showLevel, setShowLevel] = useState(true); + const [showInstructor, setShowInstructor] = useState(true); + const [showLanguage, setShowLanguage] = useState(true); + const { categories, instructors, levels, languages } = useSelector( + (state: AppState) => state.filter + ); + const dispatch = useDispatch(); + + // handleCategory + const handleCategory = cate => { + const index = categories.findIndex(item => item === cate); + if (index >= 0) { + dispatch(add_category({ changeType: 'remove', item: cate, maxPrice })); + } else { + dispatch(add_category({ changeType: 'added', item: cate, maxPrice })); + } + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + // handleInstructor + const handleInstructor = instructor => { + dispatch(add_instructor({ instructor, maxPrice })); + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + // handleLevel + const handleLevel = level => { + dispatch(add_level({ level, maxPrice })); + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + // handleLanguage + const handleLanguage = language => { + dispatch(add_language({ language, maxPrice })); + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + // handlePrice + useEffect(() => { + dispatch(add_price(price)); + }, [dispatch, price]); + + // handlePriceChange + const handlePriceChange = value => { + setPrice(value); + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + return ( +
+
+
+
setShowCategory(!showCategory)} + > + Categories +
+ +
+ {all_categories.map((c, i) => ( +
+ handleCategory(c)} + type='checkbox' + checked={categories.includes(c)} + id={`cat-check${i + 1}`} + readOnly + /> + +
+ ))} +
+
+
+ +
+
+
setShowInstructor(!showInstructor)} + > + Instructor +
+ +
+ {all_instructors.map((instructor, i) => ( +
+ handleInstructor(instructor)} + checked={instructors.includes(instructor)} + type='checkbox' + id={`cat-check-2${i + 1}`} + readOnly + /> + +
+ ))} +
+
+
+ +
+
+
setShowLevel(!showLevel)} + > + Level +
+ +
+ {all_levels.map((level, i) => ( +
+ handleLevel(level)} + checked={levels.includes(level)} + type='checkbox' + id={`cat-check-3${i + 1}`} + readOnly + /> + +
+ ))} +
+
+
+ +
+
+
setShowLanguage(!showLanguage)} + > + Language +
+ +
+ {all_languages.map((language, i) => ( +
+ handleLanguage(language)} + checked={languages.includes(language)} + type='checkbox' + id={`cat-check-4${i + 1}`} + readOnly + /> + +
+ ))} +
+
+
+ +
+
Price Filter
+ handlePriceChange(val)} + /> +
+ Price: ${minPrice} - ${price} +
+
+ +
+
Reset Filter
+ +
+
+ ); +}; + +export default CourseSidebarTwo; diff --git a/src/components/common/sidebar/course-sidebar.jsx b/src/components/common/sidebar/course-sidebar.tsx similarity index 50% rename from src/components/common/sidebar/course-sidebar.jsx rename to src/components/common/sidebar/course-sidebar.tsx index 496acd7..0d01b1a 100644 --- a/src/components/common/sidebar/course-sidebar.jsx +++ b/src/components/common/sidebar/course-sidebar.tsx @@ -1,61 +1,67 @@ -import React, { useEffect, useState } from "react"; -import Slider from "react-rangeslider"; -import "react-rangeslider/lib/index.css"; -import { useDispatch, useSelector } from "react-redux"; -import { course_data } from "../../../data"; -import { add_category, add_force_page, add_instructor, add_item_offset, add_language, add_level, add_price, reset_filter } - from '../../../redux/features/filter-slice'; - +import React, { useEffect, useState } from 'react'; +import Slider from 'react-rangeslider'; +import 'react-rangeslider/lib/index.css'; +import { useDispatch, useSelector } from 'react-redux'; +import { course_data } from '../../../data'; +import { + add_category, + add_force_page, + add_instructor, + add_item_offset, + add_language, + add_level, + add_price, + reset_filter, +} from '../../../redux/features/filter-slice'; +import { AppState } from '../../../redux/store'; const courses = course_data.filter( - (arr, index, self) => index === self.findIndex((i) => i.img === arr.img && i.State === arr.State) + (arr, index, self) => index === self.findIndex(i => i.img === arr.img) // && i.State === arr.State) ); -const max_prices = courses.map((item) => Number(item.course_price)); +const max_prices = courses.map(item => Number(item.course_price)); const maxPrice = Math.max(...max_prices); const minPrice = Math.min(...max_prices); -const all_categories = [...new Set(courses.map((course) => course.category))]; -const all_instructors = [...new Set(courses.map((course) => course.instructor))]; -const all_levels = [...new Set(courses.map((course) => course.level))]; -const all_languages = [...new Set(courses.map((course) => course.language))]; +const all_categories = [...new Set(courses.map(course => course.category))]; +const all_instructors = [...new Set(courses.map(course => course.instructor))]; +const all_levels = [...new Set(courses.map(course => course.level))]; +const all_languages = [...new Set(courses.map(course => course.language))]; const CourseSidebar = ({ course_items }) => { const [price, setPrice] = useState(maxPrice); - const { categories, instructors, levels, languages, forcePage } = useSelector((state) => state.filter); + const { categories, instructors, levels, languages, forcePage } = useSelector( + (state: AppState) => state.filter + ); const dispatch = useDispatch(); // handleCategory - const handleCategory = (cate) => { - const index = categories.findIndex((item) => item === cate); + const handleCategory = cate => { + const index = categories.findIndex(item => item === cate); if (index >= 0) { - dispatch( - add_category({ changeType: "remove", item: cate, maxPrice }) - ); + dispatch(add_category({ changeType: 'remove', item: cate, maxPrice })); } else { - dispatch( - add_category({ changeType: "added", item: cate, maxPrice }) - ); + dispatch(add_category({ changeType: 'added', item: cate, maxPrice })); } dispatch(add_item_offset(0)); dispatch(add_force_page(0)); }; // handleInstructor - const handleInstructor = (instructor) => { + const handleInstructor = instructor => { dispatch(add_instructor({ instructor, maxPrice })); dispatch(add_item_offset(0)); dispatch(add_force_page(0)); }; // handleLevel - const handleLevel = (level) => { + const handleLevel = level => { dispatch(add_level({ level, maxPrice })); dispatch(add_item_offset(0)); dispatch(add_force_page(0)); }; // handleLanguage - const handleLanguage = (language) => { + const handleLanguage = language => { dispatch(add_language({ language, maxPrice })); dispatch(add_item_offset(0)); dispatch(add_force_page(0)); @@ -67,24 +73,24 @@ const CourseSidebar = ({ course_items }) => { }, [dispatch, price]); // handlePriceChange - const handlePriceChange = (value) => { + const handlePriceChange = value => { setPrice(value); dispatch(add_item_offset(0)); dispatch(add_force_page(0)); }; return ( -
-
-
-
Filter by Categories
+
+
+
+
Filter by Categories
-
+
{all_categories.map((c, i) => ( -
+
handleCategory(c)} - type="checkbox" + type='checkbox' checked={categories.includes(c)} id={`cat-check${i + 1}`} readOnly @@ -93,12 +99,11 @@ const CourseSidebar = ({ course_items }) => { {c} ( - { - course_items.filter( - (item) => - item.category === c - )?.length - } + { + course_items.filter( + item => item.category === c + )?.length + } ) @@ -108,19 +113,17 @@ const CourseSidebar = ({ course_items }) => {
-
-
-
Instructor
+
+
+
Instructor
-
+
{all_instructors.map((instructor, i) => ( -
+
handleInstructor(instructor)} - checked={instructors.includes( - instructor - )} - type="checkbox" + checked={instructors.includes(instructor)} + type='checkbox' id={`cat-check-2${i + 1}`} readOnly /> @@ -128,13 +131,11 @@ const CourseSidebar = ({ course_items }) => { {instructor} ( - { - course_items.filter( - (item) => - item.instructor === - instructor - )?.length - } + { + course_items.filter( + item => item.instructor === instructor + )?.length + } ) @@ -144,17 +145,17 @@ const CourseSidebar = ({ course_items }) => {
-
-
-
Level
+
+
+
Level
-
+
{all_levels.map((level, i) => ( -
+
handleLevel(level)} checked={levels.includes(level)} - type="checkbox" + type='checkbox' id={`cat-check-3${i + 1}`} readOnly /> @@ -162,12 +163,11 @@ const CourseSidebar = ({ course_items }) => { {level} ( - { - course_items.filter( - (item) => - item.level === level - )?.length - } + { + course_items.filter( + item => item.level === level + )?.length + } ) @@ -177,17 +177,17 @@ const CourseSidebar = ({ course_items }) => {
-
-
-
Language
+
+
+
Language
-
+
{all_languages.map((language, i) => ( -
+
handleLanguage(language)} checked={languages.includes(language)} - type="checkbox" + type='checkbox' id={`cat-check-4${i + 1}`} readOnly /> @@ -195,13 +195,11 @@ const CourseSidebar = ({ course_items }) => { {language} ( - { - course_items.filter( - (item) => - item.language === - language - )?.length - } + { + course_items.filter( + item => item.language === language + )?.length + } ) @@ -211,31 +209,33 @@ const CourseSidebar = ({ course_items }) => {
-
-
Price Filter
- +
+
Price Filter
+ handlePriceChange(val)} + orientation='horizontal' + onChange={val => handlePriceChange(val)} /> -
Price: ${minPrice} - ${price}
+
+ Price: ${minPrice} - ${price} +
-
-
Reset Filter
+
+
Reset Filter
- ) -} + ); +}; export default CourseSidebar; diff --git a/src/components/common/sidebar/off-canvas.jsx b/src/components/common/sidebar/off-canvas.jsx deleted file mode 100644 index d39a89d..0000000 --- a/src/components/common/sidebar/off-canvas.jsx +++ /dev/null @@ -1,73 +0,0 @@ -import Link from 'next/link'; -import React, { useState } from 'react'; -import menu_data from '../../../layout/headers/menu-data'; - -const OffCanvas = ({ isOpen, setIsOpen }) => { - const [navTitle, setNavTitle] = useState('') - - const openMobileMenu = (menu) => { - if(navTitle === menu){ - setNavTitle('') - } - else { - setNavTitle(menu) - } - } - return <> -
-
-
-
- - - logo - logo - - -
- -
setIsOpen(false)}> - -
-
- -
-
    - {menu_data.map((menu, i) => ( -
  • - {menu.submenus && } - - {!menu.mobile_pages_menu && -
      - {menu?.submenus?.map((sub,i) => ( -
    • {sub.title}
    • - ))} -
    - } - - {menu.mobile_pages_menu && -
      - {menu?.mobile_pages_menu?.map((sub,i) => ( -
    • {sub.title}
    • - ))} -
    - } - - {!menu.submenus && {menu.title}} -
  • - ))} -
-
-
-
- - {/* overlay start */} -
setIsOpen(false)} className={`body-overlay ${isOpen ? 'apply' : ''}`}>
- {/* overlay end */} - ; -} - -export default OffCanvas; \ No newline at end of file diff --git a/src/components/common/sidebar/off-canvas.tsx b/src/components/common/sidebar/off-canvas.tsx new file mode 100644 index 0000000..a1f3e10 --- /dev/null +++ b/src/components/common/sidebar/off-canvas.tsx @@ -0,0 +1,131 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import menu_data from '../../../layout/headers/menu-data'; + +const OffCanvas = ({ isOpen, setIsOpen }) => { + const [navTitle, setNavTitle] = useState(''); + + const openMobileMenu = menu => { + if (navTitle === menu) { + setNavTitle(''); + } else { + setNavTitle(menu); + } + }; + return ( + <> +
+
+
+
+ + + logo + + + logo + + +
+ +
setIsOpen(false)}> + +
+
+ +
+
    + {menu_data.map((menu, i) => ( +
  • + {menu.submenus && ( + + )} + + {!menu.mobile_pages_menu && ( +
      + {menu?.submenus?.map((sub, i) => ( +
    • + + {sub.title} + +
    • + ))} +
    + )} + + {menu.mobile_pages_menu && ( +
      + {menu?.mobile_pages_menu?.map((sub, i) => ( +
    • + + {sub.title} + +
    • + ))} +
    + )} + + {!menu.submenus && ( + + {menu.title} + + )} +
  • + ))} +
+
+
+
+ + {/* overlay start */} +
setIsOpen(false)} + className={`body-overlay ${isOpen ? 'apply' : ''}`} + >
+ {/* overlay end */} + + ); +}; + +export default OffCanvas; diff --git a/src/components/common/single-course-2.jsx b/src/components/common/single-course-2.jsx deleted file mode 100644 index 083acf7..0000000 --- a/src/components/common/single-course-2.jsx +++ /dev/null @@ -1,137 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; -import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; - -const SingleCourseTwo = ({ course }) => { - const { id, img, title, level, rating, rating_count, course_price, lesson, student, duration, short_desc } = course || {}; - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - const wishlists = useSelector(wishlistItems); - const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(id)); - - const handleWishlist = (course_item) => { - if (wishlists.find(i => i.id === course_item.id)) { - dispatch(add_to_wishlist({ - change_type: 'remove_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } else { - dispatch(add_to_wishlist({ - change_type: 'add_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } - } - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id:course.id, - img:`/assets/images/course/${course.img}`, - price:course.course_price, - title:course.title - })) - } - - return ( -
-
-
-
- - - Course Meta - - -
- {duration} -
-
- -
- {level} -
- {title} -
- -
-
- - - - - -
- ({rating} /{rating_count} Rating) -
- -
${course_price}
- -
    -
  • {lesson} Lessons
  • -
  • {student} Students
  • -
-
-
- -
- -
- -
-
- - - {level} - -
- - {title} - -
- -
-
- - - - - -
- ({rating} /{rating_count} Rating) -
- -
${course_price}
- -

{short_desc}

- -
    -
  • {lesson} Lessons
  • -
  • {student} Students
  • -
- - handleAddToCart(course)} className="edu-btn btn-secondary btn-small" - style={{ cursor: 'pointer' }}> - {cartCourses.some(item => item.id === id) ? 'Added to cart' : 'Add to cart'} - - -
-
-
-
- ); -} - -export default SingleCourseTwo; \ No newline at end of file diff --git a/src/components/common/single-course-2.tsx b/src/components/common/single-course-2.tsx new file mode 100644 index 0000000..5dcde2f --- /dev/null +++ b/src/components/common/single-course-2.tsx @@ -0,0 +1,198 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; +import { AppState } from '../../redux/store'; + +const SingleCourseTwo = ({ course }) => { + const { + id, + img, + title, + level, + rating, + rating_count, + course_price, + lesson, + student, + duration, + short_desc, + } = course || {}; + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + const wishlists = useSelector(wishlistItems); + const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(id)); + + const handleWishlist = course_item => { + if (wishlists.find(i => i.id === course_item.id)) { + dispatch( + add_to_wishlist({ + change_type: 'remove_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } else { + dispatch( + add_to_wishlist({ + change_type: 'add_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } + }; + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + + return ( +
+
+
+
+ + + Course Meta + + +
+ + + {duration} + +
+
+ +
+ {level} +
+ {title} +
+ +
+
+ + + + + +
+ + ({rating} /{rating_count} Rating) + +
+ +
${course_price}
+ +
    +
  • + + {lesson} Lessons +
  • +
  • + + {student} Students +
  • +
+
+
+ +
+ +
+ +
+
+ + + {level} + +
+ {title} +
+ +
+
+ + + + + +
+ + ({rating} /{rating_count} Rating) + +
+ +
${course_price}
+ +

{short_desc}

+ +
    +
  • + + {lesson} Lessons +
  • +
  • + + {student} Students +
  • +
+ + handleAddToCart(course)} + className='edu-btn btn-secondary btn-small' + style={{ cursor: 'pointer' }} + > + {cartCourses.some(item => item.id === id) + ? 'Added to cart' + : 'Add to cart'} + + +
+
+
+
+ ); +}; + +export default SingleCourseTwo; diff --git a/src/components/common/single-instagram.jsx b/src/components/common/single-instagram.jsx deleted file mode 100644 index a5d7c24..0000000 --- a/src/components/common/single-instagram.jsx +++ /dev/null @@ -1,17 +0,0 @@ -function SingleInstagram({ img, name }) { - return ( - - ) -} - -export default SingleInstagram; \ No newline at end of file diff --git a/src/components/common/single-instagram.tsx b/src/components/common/single-instagram.tsx new file mode 100644 index 0000000..7e6ee65 --- /dev/null +++ b/src/components/common/single-instagram.tsx @@ -0,0 +1,24 @@ +function SingleInstagram({ img, name }) { + return ( + + ); +} + +export default SingleInstagram; diff --git a/src/components/common/theme.jsx b/src/components/common/theme.jsx deleted file mode 100644 index 7c431e6..0000000 --- a/src/components/common/theme.jsx +++ /dev/null @@ -1,40 +0,0 @@ -import { useTheme } from 'next-themes'; - -const Theme = () => { - const { theme, setTheme } = useTheme(); - return ( - <> -
- -
- - ) -} - -export default Theme; \ No newline at end of file diff --git a/src/components/common/theme.tsx b/src/components/common/theme.tsx new file mode 100644 index 0000000..041ad91 --- /dev/null +++ b/src/components/common/theme.tsx @@ -0,0 +1,49 @@ +import { useTheme } from 'next-themes'; + +const Theme = () => { + const { theme, setTheme } = useTheme(); + return ( + <> +
+ +
+ + ); +}; + +export default Theme; diff --git a/src/components/contact-me/contact-me-area.jsx b/src/components/contact-me/contact-me-area.jsx deleted file mode 100644 index b54d377..0000000 --- a/src/components/contact-me/contact-me-area.jsx +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; -import { SocialShare } from '../social-share'; - -const ContactMeArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-
-
-
- Contact Me -
-
    - - Shape - - - Shape - -
  • - Shape -
  • -
-
- -
-

I will Answer all Your Questions

- -
    -
  • - -
-
-
-
-
-
-
-
- ) -} - -export default ContactMeArea; \ No newline at end of file diff --git a/src/components/contact-me/contact-me-area.tsx b/src/components/contact-me/contact-me-area.tsx new file mode 100644 index 0000000..a6dd091 --- /dev/null +++ b/src/components/contact-me/contact-me-area.tsx @@ -0,0 +1,111 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; +import { SocialShare } from '../social-share'; + +const ContactMeArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+
+
+
+ + Contact Me + +
+
    + + + Shape + + + + + Shape + + +
  • + + Shape + +
  • +
+
+ +
+

+ I will Answer all Your Questions +

+ + +
+
+
+
+
+
+
+ ); +}; + +export default ContactMeArea; diff --git a/src/components/contact-me/contact-me-form-area.jsx b/src/components/contact-me/contact-me-form-area.jsx deleted file mode 100644 index d1a7dfd..0000000 --- a/src/components/contact-me/contact-me-form-area.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; -import ContactMeForm from '../forms/contact-me-form'; - -const ContactMeFormArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-
-

Just Drop Me a Line

-
- -
-
-
-
-
    - - shape - - - shape - - - - - - shape - -
-
- ) -} - -export default ContactMeFormArea; \ No newline at end of file diff --git a/src/components/contact-me/contact-me-form-area.tsx b/src/components/contact-me/contact-me-form-area.tsx new file mode 100644 index 0000000..de12a78 --- /dev/null +++ b/src/components/contact-me/contact-me-form-area.tsx @@ -0,0 +1,70 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; +import ContactMeForm from '../forms/contact-me-form'; + +const ContactMeFormArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+
+

Just Drop Me a Line

+
+ +
+
+
+
+
    + + + shape + + + + + shape + + + + + + + + shape + + +
+
+ ); +}; + +export default ContactMeFormArea; diff --git a/src/components/contact-me/index.jsx b/src/components/contact-me/index.tsx similarity index 65% rename from src/components/contact-me/index.jsx rename to src/components/contact-me/index.tsx index c56312c..cdaf096 100644 --- a/src/components/contact-me/index.jsx +++ b/src/components/contact-me/index.tsx @@ -7,15 +7,15 @@ import ContactMeFormArea from './contact-me-form-area'; const index = () => { return (
-
+
- - - + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/contact-us/contact-map.jsx b/src/components/contact-us/contact-map.jsx deleted file mode 100644 index caf8472..0000000 --- a/src/components/contact-us/contact-map.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; - -const ContactMap = () => { - return ( -
-
-
- -
-
-
- ) -} - -export default ContactMap; \ No newline at end of file diff --git a/src/components/contact-us/contact-map.tsx b/src/components/contact-us/contact-map.tsx new file mode 100644 index 0000000..8db1289 --- /dev/null +++ b/src/components/contact-us/contact-map.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +const ContactMap = () => { + return ( +
+
+
+ +
+
+
+ ); +}; + +export default ContactMap; diff --git a/src/components/contact-us/contact-us-area.jsx b/src/components/contact-us/contact-us-area.jsx deleted file mode 100644 index a707e7c..0000000 --- a/src/components/contact-us/contact-us-area.jsx +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; -import { motion } from 'framer-motion'; -import { useMouseMoveUI } from '../../contexts/mouse-move-context'; -import ContactUsForm from '../forms/contact-us-form'; -import { SocialShare } from '../social-share'; - -const ContactUsArea = () => { - const { mouseDirection, mouseReverse } = useMouseMoveUI(); - return ( -
-
-
-
-
-

{"We're"} Always Eager to Hear From You!

- -
    -
  • - -
-
-
- -
-
-
-

Get In Touch

-

Fill out this form for booking a consultant advising session.

-
- {/* form start */} - - {/* form end */} -
    - - Shape - - - Shape - -
-
-
-
-
-
- ) -} - -export default ContactUsArea; \ No newline at end of file diff --git a/src/components/contact-us/contact-us-area.tsx b/src/components/contact-us/contact-us-area.tsx new file mode 100644 index 0000000..741369a --- /dev/null +++ b/src/components/contact-us/contact-us-area.tsx @@ -0,0 +1,104 @@ +import React from 'react'; +import { motion } from 'framer-motion'; +import { useMouseMoveUI } from '../../contexts/mouse-move-context'; +import ContactUsForm from '../forms/contact-us-form'; +import { SocialShare } from '../social-share'; + +const ContactUsArea = () => { + const { mouseDirection, mouseReverse } = useMouseMoveUI(); + return ( +
+
+
+
+
+

+ {"We're"} Always Eager to Hear From You! +

+ + +
+
+ +
+
+
+

Get In Touch

+

+ Fill out this form for booking a consultant advising + session. +

+
+ {/* form start */} + + {/* form end */} +
    + + + Shape + + + + + Shape + + +
+
+
+
+
+
+ ); +}; + +export default ContactUsArea; diff --git a/src/components/contact-us/index.jsx b/src/components/contact-us/index.tsx similarity index 65% rename from src/components/contact-us/index.jsx rename to src/components/contact-us/index.tsx index e20bfd0..9de9ab8 100644 --- a/src/components/contact-us/index.jsx +++ b/src/components/contact-us/index.tsx @@ -4,19 +4,18 @@ import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import ContactMap from './contact-map'; import ContactUsArea from './contact-us-area'; - const index = () => { return (
-
+
- - - + + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-details-2/course-details-two.jsx b/src/components/course-details-2/course-details-two.jsx deleted file mode 100644 index cd3b93d..0000000 --- a/src/components/course-details-2/course-details-two.jsx +++ /dev/null @@ -1,168 +0,0 @@ -import React from 'react'; -import CourseDetailsSidebar from '../common/sidebar/course-details-sidebar'; -import SingleComment from '../course-details/single-comment'; -import SingleProgressbar from '../course-details/single-progressbar'; -import SingleAccordion from './single-accordion'; - -const CourseDetailsTwo = ({ course }) => { - const { course_desc, course_desc_2, learn_list, course_desc_3, curriculum_desc, course_lessons, instructor_img, instructor_title, instructor_desc, social_links, reviews, instructor, rating, rating_count } = course || {}; - return ( -
-
-
-
-
-
-

About This Course

-

{course_desc}

-

{course_desc_2}

-
-
What You’ll Learn?
-
-
-
    -
  • Learn to use Python professionally, learning both Python 2 & Python 3!
  • -
  • Build 6 beautiful real-world projects for your portfolio (not boring toy apps)
  • -
-
- -
-
    -
  • Understand the Theory behind Vue.js and use it in Real Projects
  • -
  • Create responsive, accessible, and beautiful layouts
  • -
-
-
-
- -

Requirements

-
    -
  • No prior knowledge of Wordpress is required as everything will be covered in this course.
  • -
  • Basic HTML and CSS knowledge helps, but {"isn't"} a must-have
  • -
  • You {"don't"} need any coding experience at all. That is the beauty of Wordpress.
  • -
  • Basic JavaScript knowledge is required
  • -
- -

Target Audience

-
    -
  • Newcomer as well as experienced frontend developers interested in learning a modern JavaScript framework
  • -
  • If you want to learn to master Wordpress without getting bogged down with technical jargon, this course is for you.
  • -
  • This course is for you if you want to build a website, whether for personal or business reasons.
  • -
  • This course is perfect for you if you are taking over an existing Wordpress website, or want to build one from
  • -
-
- -
-

Topics for This Course

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor inc idid unt ut labore et dolore magna aliqua.

-
- - - - - -
-
- -
-

Your Instructors

-
-
- team images -
- -
-
{instructor}
- {instructor_title} -

{instructor_desc}

-
    - {social_links?.map((social, i) => ( -
  • - - - -
  • - ))} -
-
-
-
- -
-

Student Feedback

-

{rating} average rating based on {rating_count} rating

-
-
-
-
{rating}
-
- - - - - -
- ({rating_count} Review) -
-
- -
-
- - - - - -
-
-
- -
-

Reviews

-
- {reviews?.map((review, i) => ( - - ))} -
-
-
-
-
-
- -
-
-
-
- ) -} - -export default CourseDetailsTwo; \ No newline at end of file diff --git a/src/components/course-details-2/course-details-two.tsx b/src/components/course-details-2/course-details-two.tsx new file mode 100644 index 0000000..ff792b8 --- /dev/null +++ b/src/components/course-details-2/course-details-two.tsx @@ -0,0 +1,414 @@ +import React from 'react'; +import CourseDetailsSidebar from '../common/sidebar/course-details-sidebar'; +import SingleComment from '../course-details/single-comment'; +import SingleProgressbar from '../course-details/single-progressbar'; +import SingleAccordion from './single-accordion'; + +const CourseDetailsTwo = ({ course }) => { + const { + course_desc, + course_desc_2, + learn_list, + course_desc_3, + curriculum_desc, + course_lessons, + instructor_img, + instructor_title, + instructor_desc, + social_links, + reviews, + instructor, + rating, + rating_count, + } = course || {}; + return ( +
+
+
+
+
+
+

+ About This Course +

+

+ {course_desc} +

+

+ {course_desc_2} +

+
+
+ What You’ll Learn? +
+
+
+
    +
  • + Learn to use Python professionally, + learning both Python 2 & Python 3! +
  • +
  • + Build 6 beautiful real-world projects + for your portfolio (not boring toy + apps) +
  • +
+
+ +
+
    +
  • + Understand the Theory behind Vue.js + and use it in Real Projects +
  • +
  • + Create responsive, accessible, and + beautiful layouts +
  • +
+
+
+
+ +

+ Requirements +

+
    +
  • + No prior knowledge of Wordpress is required as + everything will be covered in this course. +
  • +
  • + Basic HTML and CSS knowledge helps, but {"isn't"}{' '} + a must-have +
  • +
  • + You {"don't"} need any coding experience at all. + That is the beauty of Wordpress. +
  • +
  • Basic JavaScript knowledge is required
  • +
+ +

+ Target Audience +

+
    +
  • + Newcomer as well as experienced frontend + developers interested in learning a modern + JavaScript framework +
  • +
  • + If you want to learn to master Wordpress without + getting bogged down with technical jargon, this + course is for you. +
  • +
  • + This course is for you if you want to build a + website, whether for personal or business reasons. +
  • +
  • + This course is perfect for you if you are taking + over an existing Wordpress website, or want to + build one from +
  • +
+
+ +
+

+ Topics for This Course +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing + elit, sed do eiusmod tempor inc idid unt ut labore et + dolore magna aliqua. +

+
+ + + + +
+
+ +
+

Your Instructors

+
+
+ + team images + +
+ +
+
{instructor}
+ + {instructor_title} + +

{instructor_desc}

+
    + {social_links?.map((social, i) => ( +
  • + + + +
  • + ))} +
+
+
+
+ +
+

Student Feedback

+

+ {rating} average rating based on {rating_count} rating +

+
+
+
+
{rating}
+
+ + + + + +
+ ({rating_count} Review) +
+
+ +
+
+ + + + + +
+
+
+ +
+

Reviews

+
+ {reviews?.map((review, i) => ( + + ))} +
+
+
+
+
+
+ +
+
+
+
+ ); +}; + +export default CourseDetailsTwo; diff --git a/src/components/course-details-2/index.jsx b/src/components/course-details-2/index.tsx similarity index 68% rename from src/components/course-details-2/index.jsx rename to src/components/course-details-2/index.tsx index e7272d0..6f2a4fe 100644 --- a/src/components/course-details-2/index.jsx +++ b/src/components/course-details-2/index.tsx @@ -3,17 +3,17 @@ import { Footer, Header } from '../../layout'; import CourseBreadcrumb from '../breadcrumb/breadcrumb-5'; import CourseDetailsTwo from './course-details-two'; -const index = ({course}) => { +const index = ({ course }) => { return (
-
+
- +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-details-2/single-accordion.jsx b/src/components/course-details-2/single-accordion.jsx deleted file mode 100644 index 07575a8..0000000 --- a/src/components/course-details-2/single-accordion.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; - -const SingleAccordion = ({ show = false, id, title, desc }) => { - return ( -
-

- -

- -
-
-
-
    - {desc.map((list, i) => ( -
  • - {list.title && -
    - - {list.title} -
    - } - {!list?.badge_list && -
    - -
    - } - {list?.badge_list && -
    - {list?.question} Question - {list?.minutes} Minutes -
    - } -
  • - ))} -
-
-
-
-
- ) -} - -export default SingleAccordion; \ No newline at end of file diff --git a/src/components/course-details-2/single-accordion.tsx b/src/components/course-details-2/single-accordion.tsx new file mode 100644 index 0000000..4857685 --- /dev/null +++ b/src/components/course-details-2/single-accordion.tsx @@ -0,0 +1,59 @@ +import React from 'react'; + +const SingleAccordion = ({ show = false, id, title, desc }) => { + return ( +
+

+ +

+ +
+
+
+
    + {desc.map((list, i) => ( +
  • + {list.title && ( +
    + + {list.title} +
    + )} + {!list?.badge_list && ( +
    + +
    + )} + {list?.badge_list && ( +
    + + {list?.question} Question + + + {list?.minutes} Minutes + +
    + )} +
  • + ))} +
+
+
+
+
+ ); +}; + +export default SingleAccordion; diff --git a/src/components/course-details-3/course-details-three.jsx b/src/components/course-details-3/course-details-three.jsx deleted file mode 100644 index 6cbd4a2..0000000 --- a/src/components/course-details-3/course-details-three.jsx +++ /dev/null @@ -1,227 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import useModal from '../../hooks/use-modal'; -import VideoModal from '../common/popup-modal/video-modal'; -import DetailsSidebar from './details-sidebar'; - -const CourseDetailsThree = () => { - const { isVideoOpen, setIsVideoOpen } = useModal(); - return <> -
-
-
-
-
-
-

Global Education Fall Meeting for Everyone

-
    -
  • by Edward Norton
  • -
  • English
  • -
  • -
    - - - - - -
    - (720 Rating) -
  • -
- - -
- -
-
-
Current Status
- Not Enrolled -
-
-
Price
- $70.00 -
-
-
Get Started
- Take This Course -
- or - - Login - -
-
-
- -
-
    -
  • - -
  • - -
  • - -
  • -
- -
-
-
-
-

Course Description

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor inc idid unt ut labore et dolore magna aliqua enim ad minim veniam, quis nostrud exerec tation ullamco laboris nis aliquip commodo consequat duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur enim ipsam.

- -

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

- -
    -
  • No prior knowledge of Wordpress is required as everything will be covered in this course.
  • -
  • Basic HTML and CSS knowledge helps, but {"isn't"} a must-have
  • -
  • You {"don't"} need any coding experience at all. That is the beauty of Wordpress.
  • -
  • Basic JavaScript knowledge is required
  • -
- -
Key Features
-
    -
  • No prior knowledge of Wordpress is required as everything will be covered in this course.
  • -
  • Basic HTML and CSS knowledge helps, but {"isn't"} a must-have
  • -
  • Basic JavaScript knowledge is required
  • -
-
-
-
- -
-
-
-
-

Course Content

-
- -
-
- -
-

Introduction

-
-

- -

- -
-
-
-
-
Lesson Content
- - 0% COMPLETE - 0/1 Steps - -
- -
    -
  • Topic 1 – Grounding
  • -
  • Topic 2 – Igniting
  • -
  • Topic 3 – Awareness
  • -
-
-
-
-
- -
-

- -

-
- -
-

- -

-
- -

Section 2

-
-

- -

-
- -
-

- -

-
- -

Section 3

-
-

- -

-
-
-
-
    -
  • Topic 1 – Grounding
  • -
  • Topic 2 – Igniting
  • -
  • Topic 3 – Awareness
  • -
-
-
-
-
- -
-

- -

-
- -
-

- -

-
-
-
-
-
-
-
-
-
-
- {/* sidebar start */} - - {/* sidebar end */} -
-
-
-
- - {/* video modal start */} - - {/* video modal end */} - ; -} - -export default CourseDetailsThree; \ No newline at end of file diff --git a/src/components/course-details-3/course-details-three.tsx b/src/components/course-details-3/course-details-three.tsx new file mode 100644 index 0000000..7c23346 --- /dev/null +++ b/src/components/course-details-3/course-details-three.tsx @@ -0,0 +1,426 @@ +import Link from 'next/link'; +import React from 'react'; +import useModal from '../../hooks/use-modal'; +import VideoModal from '../common/popup-modal/video-modal'; +import DetailsSidebar from './details-sidebar'; + +const CourseDetailsThree = () => { + const { isVideoOpen, setIsVideoOpen } = useModal(); + return ( + <> +
+
+
+
+
+
+

+ Global Education Fall Meeting for Everyone +

+
    +
  • + by Edward Norton +
  • +
  • + English +
  • +
  • +
    + + + + + +
    + + (720 Rating) + +
  • +
+ + +
+ +
+
+
Current Status
+ + Not Enrolled + +
+
+
Price
+ $70.00 +
+
+
Get Started
+ + Take This Course + +
+ or + Login +
+
+
+ +
+
    +
  • + +
  • + +
  • + +
  • +
+ +
+
+
+
+

+ Course Description +

+

+ Lorem ipsum dolor sit amet, + consectetur adipisicing elit, sed + do eiusmod tempor inc idid unt ut + labore et dolore magna aliqua enim + ad minim veniam, quis nostrud + exerec tation ullamco laboris nis + aliquip commodo consequat duis + aute irure dolor in reprehenderit + in voluptate velit esse cillum + dolore eu fugiat nulla pariatur + enim ipsam. +

+ +

+ Excepteur sint occaecat cupidatat + non proident sunt in culpa qui + officia deserunt mollit anim id + est laborum. Sed ut perspiciatis + unde omnis iste natus error sit + voluptatem accusantium doloremque + laudantium totam rem aperiam. +

+ +
    +
  • + No prior knowledge of + Wordpress is required as + everything will be covered in + this course. +
  • +
  • + Basic HTML and CSS knowledge + helps, but {"isn't"} a + must-have +
  • +
  • + You {"don't"} need any coding + experience at all. That is the + beauty of Wordpress. +
  • +
  • + Basic JavaScript knowledge is + required +
  • +
+ +
+ Key Features +
+
    +
  • + No prior knowledge of + Wordpress is required as + everything will be covered in + this course. +
  • +
  • + Basic HTML and CSS knowledge + helps, but {"isn't"} a + must-have +
  • +
  • + Basic JavaScript knowledge is + required +
  • +
+
+
+
+ +
+
+
+
+

+ Course Content +

+
+ +
+
+ +
+

+ Introduction +

+
+

+ +

+ +
+
+
+
+
+ {' '} + Lesson + Content +
+ + + 0% + COMPLETE + + + 0/1 + Steps + + +
+ +
    +
  • + Topic 1 – + Grounding +
  • +
  • + Topic 2 – + Igniting +
  • +
  • + Topic 3 – + Awareness +
  • +
+
+
+
+
+ +
+

+ +

+
+ +
+

+ +

+
+ +

+ Section 2 +

+
+

+ +

+
+ +
+

+ +

+
+ +

+ Section 3 +

+
+

+ +

+
+
+
+
    +
  • + Topic 1 – + Grounding +
  • +
  • + Topic 2 – + Igniting +
  • +
  • + Topic 3 – + Awareness +
  • +
+
+
+
+
+ +
+

+ +

+
+ +
+

+ +

+
+
+
+
+
+
+
+
+
+
+ {/* sidebar start */} + + {/* sidebar end */} +
+
+
+
+ + {/* video modal start */} + + {/* video modal end */} + + ); +}; + +export default CourseDetailsThree; diff --git a/src/components/course-details-3/details-sidebar.jsx b/src/components/course-details-3/details-sidebar.jsx deleted file mode 100644 index 419f46a..0000000 --- a/src/components/course-details-3/details-sidebar.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import { Books } from '../../svg'; - -const DetailsSidebar = () => { - return ( -
-
-
-
-

Course Includes:

-
    -
  • - Price: - $70.00 -
  • -
  • - Instrutor: - Edward Norton -
  • -
  • - Duration: - 3 weeks -
  • -
  • - Lessons: - 8 -
  • -
  • - Enrolled: - 65 students -
  • -
  • - Language: - English -
  • -
  • - Certificate: - Yes -
  • -
- - - -
-

Share On:

-
    -
  • -
  • -
  • -
  • -
-
-
-
-
-
- ) -} - -export default DetailsSidebar; \ No newline at end of file diff --git a/src/components/course-details-3/details-sidebar.tsx b/src/components/course-details-3/details-sidebar.tsx new file mode 100644 index 0000000..3c81a6f --- /dev/null +++ b/src/components/course-details-3/details-sidebar.tsx @@ -0,0 +1,95 @@ +import React from 'react'; +import { Books } from '../../svg'; + +const DetailsSidebar = () => { + return ( +
+
+
+
+

Course Includes:

+
    +
  • + + Price: + + $70.00 +
  • +
  • + + Instrutor: + + Edward Norton +
  • +
  • + + Duration: + + 3 weeks +
  • +
  • + + + Lessons: + + 8 +
  • +
  • + + Enrolled: + + 65 students +
  • +
  • + + Language: + + English +
  • +
  • + + Certificate: + + Yes +
  • +
+ + + +
+

Share On:

+ +
+
+
+
+
+ ); +}; + +export default DetailsSidebar; diff --git a/src/components/course-details-3/index.jsx b/src/components/course-details-3/index.tsx similarity index 66% rename from src/components/course-details-3/index.jsx rename to src/components/course-details-3/index.tsx index fb4e6e8..2e95871 100644 --- a/src/components/course-details-3/index.jsx +++ b/src/components/course-details-3/index.tsx @@ -6,14 +6,14 @@ import CourseDetailsThree from './course-details-three'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-details/course-details-area.jsx b/src/components/course-details/course-details-area.jsx deleted file mode 100644 index c333b35..0000000 --- a/src/components/course-details/course-details-area.jsx +++ /dev/null @@ -1,219 +0,0 @@ -import React from 'react'; -import CourseDetailsSidebar from '../common/sidebar/course-details-sidebar'; -import CommentFormCourse from '../forms/comment-form-course'; -import SingleComment from './single-comment'; -import SingleProgressbar from './single-progressbar'; -import WritingEvaluationForm from "../forms/writing-evaluation-form"; - -const CourseDetailsArea = ({course}) => { - const { - course_desc, - course_desc_2, - learn_list, - course_desc_3, - curriculum_desc, - course_lessons, - instructor_img, - instructor_title, - instructor_desc, - social_links, - reviews, - instructor, - rating, - rating_count - } = course || {}; - return ( -
-
-
-
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
- -
-
-
-
-

Course Description

-

{course_desc}

-

{course_desc_2}

-
What You’ll Learn?
-
    - {learn_list?.map((l, i) =>
  • {l}
  • )} -
-

{course_desc_3}

- - -
-
-
- -
-
-
-

Course Curriculum

-

{curriculum_desc}

- {course_lessons?.map((lesson, i) => ( -
-
{lesson?.title}
-

{lesson?.text}

-
    - {lesson?.lessons?.map((list, i) => ( -
  • - {list.title && -
    - - {list.title} -
    - } - - {!list?.badge_list && -
    - -
    - } - - {list?.badge_list && -
    - {list?.question} Question - {list?.minutes} Minutes -
    - } -
  • - ))} -
-
- ))} -
-
-
- -
-
-
-
- team images -
-
-
{instructor}
- {instructor_title} -

{instructor_desc}

-
    - {social_links?.map((social, i) => ( -
  • - - - -
  • - ))} -
-
-
-
-
- -
-
-
-

Course Rating

-

{rating} average rating based on {rating_count} rating

-
-
-
-
{rating}
-
- - - - - -
- ({rating_count} Review) -
-
-
-
- - - - - -
-
-
- -
-

Reviews

-
- {reviews?.map((review, i) => ( - - ))} -
-
- -
-

Write a Review

-
-
Rating Here
-
- - - - - -
-
- -
-
-
-
-
-
-
- -
- -
-
-
-
- ) -} - -export default CourseDetailsArea; diff --git a/src/components/course-details/course-details-area.tsx b/src/components/course-details/course-details-area.tsx new file mode 100644 index 0000000..6814bce --- /dev/null +++ b/src/components/course-details/course-details-area.tsx @@ -0,0 +1,332 @@ +import React from 'react'; +import CourseDetailsSidebar from '../common/sidebar/course-details-sidebar'; +import CommentFormCourse from '../forms/comment-form-course'; +import SingleComment from './single-comment'; +import SingleProgressbar from './single-progressbar'; +import WritingEvaluation from '../forms/writing-evaluation-form'; + +const CourseDetailsArea = ({ course }) => { + const { + course_desc, + course_desc_2, + learn_list, + course_desc_3, + curriculum_desc, + course_lessons, + instructor_img, + instructor_title, + instructor_desc, + social_links, + reviews, + instructor, + rating, + rating_count, + } = course || {}; + return ( +
+
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ +
+
+
+
+

+ Course Description +

+

{course_desc}

+

{course_desc_2}

+
What You’ll Learn?
+
    + {learn_list?.map((l, i) => ( +
  • {l}
  • + ))} +
+

{course_desc_3}

+ + +
+
+
+ +
+
+
+

+ Course Curriculum +

+

{curriculum_desc}

+ {course_lessons?.map((lesson, i) => ( +
+
+ {lesson?.title} +
+

{lesson?.text}

+
    + {lesson?.lessons?.map( + (list, i) => ( +
  • + {list.title && ( +
    + + {list.title} +
    + )} + + {!list?.badge_list && ( +
    + +
    + )} + + {list?.badge_list && ( +
    + + { + list?.question + }{' '} + Question + + + { + list?.minutes + }{' '} + Minutes + +
    + )} +
  • + ) + )} +
+
+ ))} +
+
+
+ +
+
+
+
+ + team images + +
+
+
{instructor}
+ + {instructor_title} + +

{instructor_desc}

+
    + {social_links?.map((social, i) => ( +
  • + + + +
  • + ))} +
+
+
+
+
+ +
+
+
+

+ Course Rating +

+

+ {rating} average rating based on{' '} + {rating_count} rating +

+
+
+
+
+ {rating} +
+
+ + + + + +
+ + ({rating_count} Review) + +
+
+
+
+ + + + + +
+
+
+ +
+

Reviews

+
+ {reviews?.map((review, i) => ( + + ))} +
+
+ +
+

+ Write a Review +

+
+
Rating Here
+
+ + + + + +
+
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+ ); +}; + +export default CourseDetailsArea; diff --git a/src/components/course-details/index.jsx b/src/components/course-details/index.tsx similarity index 72% rename from src/components/course-details/index.jsx rename to src/components/course-details/index.tsx index 9105e8c..a3f0940 100644 --- a/src/components/course-details/index.jsx +++ b/src/components/course-details/index.tsx @@ -3,17 +3,17 @@ import { Footer, Header } from '../../layout'; import CourseBreadcrumb from '../breadcrumb/breadcrumb-5'; import CourseDetailsArea from './course-details-area'; -const index = ({course}) => { +const index = ({ course }) => { return (
-
+
- +
- ) -} + ); +}; export default index; diff --git a/src/components/course-details/single-comment.jsx b/src/components/course-details/single-comment.jsx deleted file mode 100644 index f534d2d..0000000 --- a/src/components/course-details/single-comment.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; - -const SingleComment = ({review}) => { - return ( -
-
- Comment Images -
-
-
- - - - - -
-
{review?.title}
- {review?.date} -

{review?.desc}

-
-
- ) -} - -export default SingleComment; \ No newline at end of file diff --git a/src/components/course-details/single-comment.tsx b/src/components/course-details/single-comment.tsx new file mode 100644 index 0000000..467bc9c --- /dev/null +++ b/src/components/course-details/single-comment.tsx @@ -0,0 +1,27 @@ +import React from 'react'; + +const SingleComment = ({ review }) => { + return ( +
+
+ + Comment Images + +
+
+
+ + + + + +
+
{review?.title}
+ {review?.date} +

{review?.desc}

+
+
+ ); +}; + +export default SingleComment; diff --git a/src/components/course-details/single-progressbar.jsx b/src/components/course-details/single-progressbar.jsx deleted file mode 100644 index 33eab02..0000000 --- a/src/components/course-details/single-progressbar.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -const SingleProgressbar = ({value,rating_value}) => { - return ( -
-
- 5 -
-
-
-
- {rating_value} -
- ) -} - -export default SingleProgressbar; \ No newline at end of file diff --git a/src/components/course-details/single-progressbar.tsx b/src/components/course-details/single-progressbar.tsx new file mode 100644 index 0000000..6418114 --- /dev/null +++ b/src/components/course-details/single-progressbar.tsx @@ -0,0 +1,24 @@ +import React from 'react'; + +const SingleProgressbar = ({ value, rating_value }) => { + return ( +
+
+ 5 +
+
+
+
+ {rating_value} +
+ ); +}; + +export default SingleProgressbar; diff --git a/src/components/course-filter/sorting-area.jsx b/src/components/course-filter/sorting-area.jsx deleted file mode 100644 index a30981b..0000000 --- a/src/components/course-filter/sorting-area.jsx +++ /dev/null @@ -1,61 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch } from 'react-redux'; -import { add_force_page, add_item_offset } from '../../redux/features/filter-slice'; - -const SortingArea = ({course_items, num, setCourses, courses,course_list, items }) => { - const dispatch = useDispatch(); - - const handleChange = (e) => { - if (e.target.value === 'Filters') { - setCourses(course_items); - } else if (e.target.value === 'Low To High') { - const lowToHigh = courses.slice().sort((a, b) => parseFloat(a.course_price) - parseFloat(b.course_price)) - setCourses(lowToHigh); - } else if (e.target.value === 'High To Low') { - const highToHigh = courses.slice().sort((a, b) => parseFloat(b.course_price) - parseFloat(a.course_price)) - setCourses(highToHigh); - } - dispatch(add_item_offset(0)); - dispatch(add_force_page(0)); - } - - return ( -
-
- { - items - ? (
Showing {num} of {items.length} courses
) - : (
Showing {num} courses
) - } -
-
-
- -
    -
  • - - - -
  • -
  • - - - -
  • -
-
-
-
- -
-
-
- ); -} - -export default SortingArea; \ No newline at end of file diff --git a/src/components/course-filter/sorting-area.tsx b/src/components/course-filter/sorting-area.tsx new file mode 100644 index 0000000..0e520b2 --- /dev/null +++ b/src/components/course-filter/sorting-area.tsx @@ -0,0 +1,94 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch } from 'react-redux'; +import { add_force_page, add_item_offset } from '../../redux/features/filter-slice'; + +// TODO: change any +type SortingAreaProps = { + course_items?: any; + num: number; + setCourses?: any; + courses?: any; + course_list?: boolean; + items?: any; +}; + +const SortingArea = ({ + course_items, + num, + setCourses, + courses, + course_list, + items, +}: SortingAreaProps) => { + const dispatch = useDispatch(); + + const handleChange = e => { + if (e.target.value === 'Filters') { + setCourses(course_items); + } else if (e.target.value === 'Low To High') { + const lowToHigh = courses + .slice() + .sort((a, b) => parseFloat(a.course_price) - parseFloat(b.course_price)); + setCourses(lowToHigh); + } else if (e.target.value === 'High To Low') { + const highToHigh = courses + .slice() + .sort((a, b) => parseFloat(b.course_price) - parseFloat(a.course_price)); + setCourses(highToHigh); + } + dispatch(add_item_offset(0)); + dispatch(add_force_page(0)); + }; + + return ( +
+
+ {items ? ( +
+ Showing {num} of {items.length} courses +
+ ) : ( +
+ Showing {num} courses +
+ )} +
+
+
+ +
    +
  • + + + +
  • +
  • + + + +
  • +
+
+
+
+ +
+ +
+
+
+ ); +}; + +export default SortingArea; diff --git a/src/components/course-style-1/course-1-area.jsx b/src/components/course-style-1/course-1-area.jsx deleted file mode 100644 index 0259f62..0000000 --- a/src/components/course-style-1/course-1-area.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import React, {useEffect} from 'react'; -import {useState} from 'react'; -import SortingArea from '../course-filter/sorting-area'; -import CourseTypeOne from '../course/course-type-one'; - -const CourseArea = ({initialCourses}) => { - const coursePerView = 8; - const [next, setNext] = useState(coursePerView); - const [courses, setCourses] = useState(initialCourses); - - // handleLoadData - const handleLoadData = () => { - setNext(value => value + 4) - } - - return ( -
-
- - -
- {courses.slice(0, next)?.map((course) => { - return ( -
- -
- ) - })} -
- - {next < courses.length && - - } -
-
- ) -} - -export default CourseArea; diff --git a/src/components/course-style-1/course-1-area.tsx b/src/components/course-style-1/course-1-area.tsx new file mode 100644 index 0000000..90a5203 --- /dev/null +++ b/src/components/course-style-1/course-1-area.tsx @@ -0,0 +1,57 @@ +import React, { useEffect } from 'react'; +import { useState } from 'react'; +import SortingArea from '../course-filter/sorting-area'; +import CourseTypeOne from '../course/course-type-one'; + +const CourseArea = ({ initialCourses }) => { + const coursePerView = 8; + const [next, setNext] = useState(coursePerView); + const [courses, setCourses] = useState(initialCourses); + + // handleLoadData + const handleLoadData = () => { + setNext(value => value + 4); + }; + + return ( +
+
+ + +
+ {courses.slice(0, next)?.map(course => { + return ( +
+ +
+ ); + })} +
+ + {next < courses.length && ( + + )} +
+
+ ); +}; + +export default CourseArea; diff --git a/src/components/course-style-1/index.jsx b/src/components/course-style-1/index.tsx similarity index 62% rename from src/components/course-style-1/index.jsx rename to src/components/course-style-1/index.tsx index 9f3cbf3..5205d6c 100644 --- a/src/components/course-style-1/index.jsx +++ b/src/components/course-style-1/index.tsx @@ -3,17 +3,17 @@ import { Footer, Header } from '../../layout'; import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import CourseArea from './course-1-area'; -const index = ({courses}) => { +const index = ({ courses }) => { return (
-
+
- - + +
- ) -} + ); +}; export default index; diff --git a/src/components/course-style-2/course-2-area.jsx b/src/components/course-style-2/course-2-area.jsx deleted file mode 100644 index c8d1433..0000000 --- a/src/components/course-style-2/course-2-area.jsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react'; -import { useState } from 'react'; -import { course_data } from '../../data'; -import SortingArea from '../course-filter/sorting-area'; -import CourseTypeSix from '../course/course-type-six'; - -const CourseTwoArea = () => { - const coursePerView = 6; - const [next, setNext] = useState(coursePerView); - const [courses,setCourses] = useState(course_data); - // handleLoadData - const handleLoadData = () => { - setNext(value => value + 3) - } - return ( -
-
- - -
- {courses?.slice(0, next)?.map((course) => ( -
- -
- ))} -
- - {next < courses.length && - - } -
-
- ) -} - -export default CourseTwoArea; \ No newline at end of file diff --git a/src/components/course-style-2/course-2-area.tsx b/src/components/course-style-2/course-2-area.tsx new file mode 100644 index 0000000..48c4acd --- /dev/null +++ b/src/components/course-style-2/course-2-area.tsx @@ -0,0 +1,51 @@ +import React from 'react'; +import { useState } from 'react'; +import { course_data } from '../../data'; +import SortingArea from '../course-filter/sorting-area'; +import CourseTypeSix from '../course/course-type-six'; + +const CourseTwoArea = () => { + const coursePerView = 6; + const [next, setNext] = useState(coursePerView); + const [courses, setCourses] = useState(course_data); + // handleLoadData + const handleLoadData = () => { + setNext(value => value + 3); + }; + return ( +
+
+ + +
+ {courses?.slice(0, next)?.map(course => ( +
+ +
+ ))} +
+ + {next < courses.length && ( + + )} +
+
+ ); +}; + +export default CourseTwoArea; diff --git a/src/components/course-style-2/index.jsx b/src/components/course-style-2/index.tsx similarity index 65% rename from src/components/course-style-2/index.jsx rename to src/components/course-style-2/index.tsx index 631c672..4ae4d94 100644 --- a/src/components/course-style-2/index.jsx +++ b/src/components/course-style-2/index.tsx @@ -6,14 +6,14 @@ import CourseTwoArea from './course-2-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-style-3/course-3-area.jsx b/src/components/course-style-3/course-3-area.jsx deleted file mode 100644 index 7114681..0000000 --- a/src/components/course-style-3/course-3-area.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { useState } from 'react'; -import { course_data } from '../../data'; -import SortingArea from '../course-filter/sorting-area'; -import CourseTypeFour from '../course/course-type-four'; - -const CourseThreeArea = () => { - const coursePerView = 6; - const [next, setNext] = useState(coursePerView); - const [courses, setCourses] = useState(course_data); - // handleLoadData - const handleLoadData = () => { - setNext(value => value + 3) - } - return ( -
-
- - -
- { courses?.slice(0, next)?.map((course, key) => ( -
- -
- ) ) } -
- - {next < courses.length && - - } -
-
- ) -} - -export default CourseThreeArea; \ No newline at end of file diff --git a/src/components/course-style-3/course-3-area.tsx b/src/components/course-style-3/course-3-area.tsx new file mode 100644 index 0000000..c3f9704 --- /dev/null +++ b/src/components/course-style-3/course-3-area.tsx @@ -0,0 +1,64 @@ +import React from 'react'; +import { useState } from 'react'; +import { course_data } from '../../data'; +import SortingArea from '../course-filter/sorting-area'; +import CourseTypeFour from '../course/course-type-four'; + +const CourseThreeArea = () => { + const coursePerView = 6; + const [next, setNext] = useState(coursePerView); + const [courses, setCourses] = useState(course_data); + // handleLoadData + const handleLoadData = () => { + setNext(value => value + 3); + }; + return ( +
+
+ + +
+ {courses?.slice(0, next)?.map((course, key) => ( +
+ +
+ ))} +
+ + {next < courses.length && ( + + )} +
+
+ ); +}; + +export default CourseThreeArea; diff --git a/src/components/course-style-3/index.jsx b/src/components/course-style-3/index.tsx similarity index 65% rename from src/components/course-style-3/index.jsx rename to src/components/course-style-3/index.tsx index 8500160..657308a 100644 --- a/src/components/course-style-3/index.jsx +++ b/src/components/course-style-3/index.tsx @@ -6,14 +6,14 @@ import CourseThreeArea from './course-3-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-style-4/course-4-area.jsx b/src/components/course-style-4/course-4-area.jsx deleted file mode 100644 index 83ea4b4..0000000 --- a/src/components/course-style-4/course-4-area.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { useState } from 'react'; -import { useSelector } from 'react-redux'; -import { course_data } from '../../data'; -import CourseSidebar from '../common/sidebar/course-sidebar'; -import SortingArea from '../course-filter/sorting-area'; -import CourseItems from './course-items'; - -// course_items -const course_items = course_data.filter((arr, index, self) => - index === self.findIndex( ( i ) => ( i.img === arr.img && i.State === arr.State ) ) ); - -const CourseFourArea = () => { - const [courses, setCourses] = useState(course_items); - const [showing,setShowing] = useState(0); - const { categories, instructors, levels, languages, price } = useSelector( (state) => state.filter ); - - let items = courses?.filter( (item1) => - categories?.length !== 0 - ? categories?.some( (item2) => item1.category == item2 ) - : item1 - ).filter( (item1) => - instructors?.length !== 0 - ? instructors?.some( (item2) => item1.instructor == item2 ) - : item1 - ).filter( (item1) => - levels?.length !== 0 - ? levels?.some( (item2) => item1.level == item2 ) - : item1 - ).filter((item1) => - languages?.length !== 0 - ? languages?.some( (item2) => item1.language == item2 ) - : item1 - ).filter(item => Number( item.course_price) <= price ) - - return ( -
-
-
-
- {/* course sidebar start */} - - {/* course sidebar end */} -
- -
- {/* sorting area start */} - - {/* sorting area end */} - - -
-
-
-
- ) -} - -export default CourseFourArea; \ No newline at end of file diff --git a/src/components/course-style-4/course-4-area.tsx b/src/components/course-style-4/course-4-area.tsx new file mode 100644 index 0000000..963fdd8 --- /dev/null +++ b/src/components/course-style-4/course-4-area.tsx @@ -0,0 +1,77 @@ +import React, { useState } from 'react'; +import { useSelector } from 'react-redux'; +import { course_data } from '../../data'; +import CourseSidebar from '../common/sidebar/course-sidebar'; +import SortingArea from '../course-filter/sorting-area'; +import CourseItems from './course-items'; +import { AppState } from '../../redux/store'; + +// course_items +const course_items = course_data.filter( + (arr, index, self) => index === self.findIndex(i => i.img === arr.img) // && i.State === arr.State) +); + +const CourseFourArea = () => { + const [courses, setCourses] = useState(course_items); + const [showing, setShowing] = useState(0); + const { categories, instructors, levels, languages, price } = useSelector( + (state: AppState) => state.filter + ); + + let items = courses + ?.filter(item1 => + categories?.length !== 0 + ? categories?.some(item2 => item1.category == item2) + : item1 + ) + .filter(item1 => + instructors?.length !== 0 + ? instructors?.some(item2 => item1.instructor == item2) + : item1 + ) + .filter(item1 => + levels?.length !== 0 ? levels?.some(item2 => item1.level == item2) : item1 + ) + .filter(item1 => + languages?.length !== 0 + ? languages?.some(item2 => item1.language == item2) + : item1 + ) + .filter(item => Number(item.course_price) <= price); + + return ( +
+
+
+
+ {/* course sidebar start */} + + {/* course sidebar end */} +
+ +
+ {/* sorting area start */} + + {/* sorting area end */} + + +
+
+
+
+ ); +}; + +export default CourseFourArea; diff --git a/src/components/course-style-4/course-items.jsx b/src/components/course-style-4/course-items.tsx similarity index 75% rename from src/components/course-style-4/course-items.jsx rename to src/components/course-style-4/course-items.tsx index 94cd092..1168073 100644 --- a/src/components/course-style-4/course-items.jsx +++ b/src/components/course-style-4/course-items.tsx @@ -1,16 +1,17 @@ -import { useState, useEffect } from "react"; -import { useDispatch, useSelector } from "react-redux"; +import { useState, useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; import { add_count_page, add_force_page, - add_item_offset -} from "../../redux/features/filter-slice"; -import Pagination from "../../ui/pagination"; + add_item_offset, +} from '../../redux/features/filter-slice'; +import Pagination from '../../ui/pagination'; import CourseTypeFive from '../course/course-type-five'; +import { AppState } from '../../redux/store'; const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { const { page_count, item_offset, forcePage } = useSelector( - (state) => state.filter + (state: AppState) => state.filter ); const [currentItems, setCurrentItems] = useState(null); const [pageCount, setPageCount] = useState(page_count); @@ -40,7 +41,7 @@ const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { }, [item_offset, page_count]); // handlePageClick - const handlePageClick = (event) => { + const handlePageClick = event => { const newOffset = (event.selected * itemsPerPage) % items.length; setItemOffset(newOffset); dispatch(add_force_page(event.selected)); @@ -48,11 +49,10 @@ const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { return ( <> - {currentItems && currentItems.map((course, i) => { - return ( - - ) - })} + {currentItems && + currentItems.map((course, i) => { + return ; + })} { focusPage={forcePage} /> - ) -} + ); +}; export default CourseItems; diff --git a/src/components/course-style-4/index.jsx b/src/components/course-style-4/index.tsx similarity index 65% rename from src/components/course-style-4/index.jsx rename to src/components/course-style-4/index.tsx index 94c1c04..91296e7 100644 --- a/src/components/course-style-4/index.jsx +++ b/src/components/course-style-4/index.tsx @@ -6,14 +6,14 @@ import CourseFourArea from './course-4-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course-style-5/course-5-area.jsx b/src/components/course-style-5/course-5-area.jsx deleted file mode 100644 index ef61aaa..0000000 --- a/src/components/course-style-5/course-5-area.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import { useState } from 'react'; -import { useSelector } from 'react-redux'; -import { course_data } from '../../data'; -import CourseSidebarTwo from '../common/sidebar/course-sidebar-2'; -import SortingArea from '../course-filter/sorting-area'; -import CourseItems from './course-items'; - -// course_items -const course_items = course_data.filter((arr, index, self) => -index === self.findIndex((i) => (i.img === arr.img && i.State === arr.State))); - -const CourseFiveArea = () => { - const [courses, setCourses] = useState(course_items); - const [showing,setShowing] = useState(0); - const { categories, instructors, levels, languages, price } = useSelector( (state) => state.filter ); - - let items = courses?.filter( (item1) => - categories?.length !== 0 - ? categories?.some( (item2) => item1.category == item2 ) - : item1 - ).filter( (item1) => - instructors?.length !== 0 - ? instructors?.some( (item2) => item1.instructor == item2 ) - : item1 - ).filter( (item1) => - levels?.length !== 0 - ? levels?.some( (item2) => item1.level == item2 ) - : item1 - ).filter( (item1) => - languages?.length !== 0 - ? languages?.some( (item2) => item1.language == item2 ) - : item1 - ).filter( item => Number(item.course_price) <= price ) - - return ( -
-
-
-
- -
- -
- {/* sorting area start */} - - {/* sorting area end */} - - -
-
-
-
- ) -} - -export default CourseFiveArea; \ No newline at end of file diff --git a/src/components/course-style-5/course-5-area.tsx b/src/components/course-style-5/course-5-area.tsx new file mode 100644 index 0000000..87e76b9 --- /dev/null +++ b/src/components/course-style-5/course-5-area.tsx @@ -0,0 +1,76 @@ +import React from 'react'; +import { useState } from 'react'; +import { useSelector } from 'react-redux'; +import { course_data } from '../../data'; +import CourseSidebarTwo from '../common/sidebar/course-sidebar-2'; +import SortingArea from '../course-filter/sorting-area'; +import CourseItems from './course-items'; +import { AppState } from '../../redux/store'; + +// course_items +const course_items = course_data.filter( + (arr, index, self) => index === self.findIndex(i => i.img === arr.img) // && i.State === arr.State) +); + +const CourseFiveArea = () => { + const [courses, setCourses] = useState(course_items); + const [showing, setShowing] = useState(0); + const { categories, instructors, levels, languages, price } = useSelector( + (state: AppState) => state.filter + ); + + let items = courses + ?.filter(item1 => + categories?.length !== 0 + ? categories?.some(item2 => item1.category == item2) + : item1 + ) + .filter(item1 => + instructors?.length !== 0 + ? instructors?.some(item2 => item1.instructor == item2) + : item1 + ) + .filter(item1 => + levels?.length !== 0 ? levels?.some(item2 => item1.level == item2) : item1 + ) + .filter(item1 => + languages?.length !== 0 + ? languages?.some(item2 => item1.language == item2) + : item1 + ) + .filter(item => Number(item.course_price) <= price); + + return ( +
+
+
+
+ +
+ +
+ {/* sorting area start */} + + {/* sorting area end */} + + +
+
+
+
+ ); +}; + +export default CourseFiveArea; diff --git a/src/components/course-style-5/course-items.jsx b/src/components/course-style-5/course-items.tsx similarity index 75% rename from src/components/course-style-5/course-items.jsx rename to src/components/course-style-5/course-items.tsx index f9cb617..ebe8acb 100644 --- a/src/components/course-style-5/course-items.jsx +++ b/src/components/course-style-5/course-items.tsx @@ -1,16 +1,17 @@ -import { useState, useEffect } from "react"; -import { useDispatch, useSelector } from "react-redux"; +import { useState, useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; import { add_count_page, add_force_page, - add_item_offset -} from "../../redux/features/filter-slice"; -import Pagination from "../../ui/pagination"; + add_item_offset, +} from '../../redux/features/filter-slice'; +import Pagination from '../../ui/pagination'; import CourseTypeEight from '../course/course-type-eight'; +import { AppState } from '../../redux/store'; const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { const { page_count, item_offset, forcePage } = useSelector( - (state) => state.filter + (state: AppState) => state.filter ); const [currentItems, setCurrentItems] = useState(null); const [pageCount, setPageCount] = useState(page_count); @@ -40,7 +41,7 @@ const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { }, [item_offset, page_count]); // handlePageClick - const handlePageClick = (event) => { + const handlePageClick = event => { const newOffset = (event.selected * itemsPerPage) % items.length; setItemOffset(newOffset); dispatch(add_force_page(event.selected)); @@ -48,11 +49,10 @@ const CourseItems = ({ itemsPerPage, items, course_style, setShowing }) => { return ( <> - {currentItems && currentItems.map((course, i) => { - return ( - - ) - })} + {currentItems && + currentItems.map((course, i) => { + return ; + })} { focusPage={forcePage} /> - ) -} + ); +}; export default CourseItems; diff --git a/src/components/course-style-5/index.jsx b/src/components/course-style-5/index.tsx similarity index 65% rename from src/components/course-style-5/index.jsx rename to src/components/course-style-5/index.tsx index bb9b99d..816f0ac 100644 --- a/src/components/course-style-5/index.jsx +++ b/src/components/course-style-5/index.tsx @@ -6,14 +6,14 @@ import CourseFiveArea from './course-5-area'; const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/course/course-type-eight.jsx b/src/components/course/course-type-eight.jsx deleted file mode 100644 index 6eb4e5a..0000000 --- a/src/components/course/course-type-eight.jsx +++ /dev/null @@ -1,164 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; -import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; - -const CourseTypeEight = ({ data, classes }) => { - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - const wishlists = useSelector(wishlistItems); - const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); - - const handleWishlist = (course_item) => { - if (wishlists.find(i => i.id === course_item.id)) { - dispatch( - add_to_wishlist({ - change_type: 'remove_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } else { - dispatch( - add_to_wishlist({ - change_type: 'add_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } - } - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id:course.id, - img:`/assets/images/course/course-06/${course.img}`, - price:course.course_price, - title:course.title - })) - } - - return ( -
-
-
- - - Course Thumb - - -
- - - {data.duration} - -
-
- -
-
- ${data?.course_price} -
- -
- - {data.title} - -
- -
-
- - - - - -
- - ({data.rating} /{data.rating_count}{" "} Rating) - -
- -

{data.short_desc}

- -
    -
  • - - {data.lesson} Lessons -
  • -
  • - - {data.student} Students -
  • -
-
-
-
-
- - {data.level} - - -
- - {data.title} - -
- -
-
- - - - - -
- - ({data.rating}) - -
- -
    -
  • {data.lesson} Lessons
  • -
  • {data.duration}
  • -
  • {data.level}
  • -
- -
-
What You’ll Learn?
-
    - { - data.features.slice(0, 3).map( (feature, featurekey) =>
  • { feature }
  • ) - } -
-
- -
- handleAddToCart(data)} style={{ cursor: "pointer" }} className="edu-btn btn-medium"> - { - cartCourses.some( - (course) => - course.id === data.id - ) - ? "Added to cart" - : "Add to cart" - } - - -
-
-
-
- ); -} - -export default CourseTypeEight; \ No newline at end of file diff --git a/src/components/course/course-type-eight.tsx b/src/components/course/course-type-eight.tsx new file mode 100644 index 0000000..8281cd8 --- /dev/null +++ b/src/components/course/course-type-eight.tsx @@ -0,0 +1,178 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; +import { AppState } from '../../redux/store'; + +// TODO: change any +type CourseTypeEightProps = { + data: any; + classes?: string; +}; + +const CourseTypeEight = ({ data, classes }: CourseTypeEightProps) => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + const wishlists = useSelector(wishlistItems); + const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); + + const handleWishlist = course_item => { + if (wishlists.find(i => i.id === course_item.id)) { + dispatch( + add_to_wishlist({ + change_type: 'remove_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } else { + dispatch( + add_to_wishlist({ + change_type: 'add_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } + }; + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/course-06/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + + return ( +
+
+
+ + + Course Thumb + + +
+ + + {data.duration} + +
+
+ +
+
${data?.course_price}
+ +
+ {data.title} +
+ +
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+ +

{data.short_desc}

+ +
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+
+
+ {data.level} + +
+ {data.title} +
+ +
+
+ + + + + +
+ ({data.rating}) +
+ +
    +
  • {data.lesson} Lessons
  • +
  • {data.duration}
  • +
  • {data.level}
  • +
+ +
+
What You’ll Learn?
+
    + {data.features.slice(0, 3).map((feature, featurekey) => ( +
  • {feature}
  • + ))} +
+
+ +
+ handleAddToCart(data)} + style={{ cursor: 'pointer' }} + className='edu-btn btn-medium' + > + {cartCourses.some(course => course.id === data.id) + ? 'Added to cart' + : 'Add to cart'} + + +
+
+
+
+ ); +}; + +export default CourseTypeEight; diff --git a/src/components/course/course-type-five.jsx b/src/components/course/course-type-five.jsx deleted file mode 100644 index 511c671..0000000 --- a/src/components/course/course-type-five.jsx +++ /dev/null @@ -1,164 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; -import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; - -const CourseTypeFive = ({ data, classes }) => { - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - const wishlists = useSelector(wishlistItems); - const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); - - const handleWishlist = (course_item) => { - if (wishlists.find(i => i.id === course_item.id)) { - dispatch( - add_to_wishlist({ - change_type: 'remove_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } else { - dispatch( - add_to_wishlist({ - change_type: 'add_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } - } - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id:course.id, - img:`/assets/images/course/course-06/${course.img}`, - price:course.course_price, - title:course.title - })) - } - - return ( -
-
-
- - - Course Thumb - - -
- - - {data.duration} - -
-
- -
-
- ${data?.course_price} -
- -
- - {data.title} - -
- -
-
- - - - - -
- - ({data.rating} /{data.rating_count}{" "} Rating) - -
- -

{data.short_desc}

- -
    -
  • - - {data.lesson} Lessons -
  • -
  • - - {data.student} Students -
  • -
-
-
-
-
- - {data.level} - - -
- - {data.title} - -
- -
-
- - - - - -
- - ({data.rating}) - -
- -
    -
  • {data.lesson} Lessons
  • -
  • {data.duration}
  • -
  • {data.level}
  • -
- -
-
What You’ll Learn?
-
    - { - data.features.slice(0, 3).map( (feature, featurekey) =>
  • { feature }
  • ) - } -
-
- -
- handleAddToCart(data)} style={{ cursor: "pointer" }} className="edu-btn btn-medium"> - { - cartCourses.some( - (course) => - course.id === data.id - ) - ? "Added to cart" - : "Add to cart" - } - - -
-
-
-
- ); -} - -export default CourseTypeFive; \ No newline at end of file diff --git a/src/components/course/course-type-five.tsx b/src/components/course/course-type-five.tsx new file mode 100644 index 0000000..0b16e24 --- /dev/null +++ b/src/components/course/course-type-five.tsx @@ -0,0 +1,178 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; +import { AppState } from '../../redux/store'; + +// TODO: change any +type CourseTypeFiveProps = { + data: any; + classes?: string; +}; + +const CourseTypeFive = ({ data, classes }: CourseTypeFiveProps) => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + const wishlists = useSelector(wishlistItems); + const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); + + const handleWishlist = course_item => { + if (wishlists.find(i => i.id === course_item.id)) { + dispatch( + add_to_wishlist({ + change_type: 'remove_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } else { + dispatch( + add_to_wishlist({ + change_type: 'add_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } + }; + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/course-06/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + + return ( +
+
+
+ + + Course Thumb + + +
+ + + {data.duration} + +
+
+ +
+
${data?.course_price}
+ +
+ {data.title} +
+ +
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+ +

{data.short_desc}

+ +
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+
+
+ {data.level} + +
+ {data.title} +
+ +
+
+ + + + + +
+ ({data.rating}) +
+ +
    +
  • {data.lesson} Lessons
  • +
  • {data.duration}
  • +
  • {data.level}
  • +
+ +
+
What You’ll Learn?
+
    + {data.features.slice(0, 3).map((feature, featurekey) => ( +
  • {feature}
  • + ))} +
+
+ +
+ handleAddToCart(data)} + style={{ cursor: 'pointer' }} + className='edu-btn btn-medium' + > + {cartCourses.some(course => course.id === data.id) + ? 'Added to cart' + : 'Add to cart'} + + +
+
+
+
+ ); +}; + +export default CourseTypeFive; diff --git a/src/components/course/course-type-four.jsx b/src/components/course/course-type-four.jsx deleted file mode 100644 index 6807bbf..0000000 --- a/src/components/course/course-type-four.jsx +++ /dev/null @@ -1,129 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; -import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; - -const CourseTypeFour = ({ data, classes }) => { - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - const wishlists = useSelector(wishlistItems); - const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); - - const handleWishlist = (course_item) => { - if (wishlists.find(i => i.id === course_item.id)) { - dispatch( - add_to_wishlist({ - change_type: 'remove_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } else { - dispatch( - add_to_wishlist({ - change_type: 'add_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } - } - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id:course.id, - img:`/assets/images/course/course-06/${course.img}`, - price:course.course_price, - title:course.title - })) - } - - return ( -
-
-
- - - Course Meta - - -
-
-
${Math.trunc(data.course_price)}
- {data.level} -
- - {data.title} - -
-
-
- - - - - -
- ({data.rating}) -
-

{data.short_desc}

-
    -
  • {data.lesson} Lessons
  • -
  • {data.student} Students
  • -
-
-
- -
-
- { data.category } -
- { data.title } -
-
-
- - - - - -
- ({ data.rating }) -
-
    -
  • { data.lesson } { data.lesson + data.lesson > 1 ? 'Lessons' : 'Lesson' }
  • -
  • { data.duration }
  • -
  • { data.level }
  • -
-
-
What You’ll Learn?
-
    - { - data.features.slice(0, 3).map( (feature, featurekey) =>
  • { feature }
  • ) - } -
-
-
- handleAddToCart(data)} - style={{cursor:'pointer'}}> - {cartCourses.some(item => item.id === data.id) ? 'Added to cart' : 'Add to cart'} - - - - -
-
-
-
- ); -} - -export default CourseTypeFour; \ No newline at end of file diff --git a/src/components/course/course-type-four.tsx b/src/components/course/course-type-four.tsx new file mode 100644 index 0000000..2ef9f4e --- /dev/null +++ b/src/components/course/course-type-four.tsx @@ -0,0 +1,165 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; +import { AppState } from '../../redux/store'; + +// TODO: change any +type CourseTypeFourProps = { + data: any; + classes?: string; +}; + +const CourseTypeFour = ({ data, classes }: CourseTypeFourProps) => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + const wishlists = useSelector(wishlistItems); + const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); + + const handleWishlist = course_item => { + if (wishlists.find(i => i.id === course_item.id)) { + dispatch( + add_to_wishlist({ + change_type: 'remove_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } else { + dispatch( + add_to_wishlist({ + change_type: 'add_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } + }; + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/course-06/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + + return ( +
+
+
+ + + Course Meta + + +
+
+
+ ${Math.trunc(data.course_price)} +
+ {data.level} +
+ {data.title} +
+
+
+ + + + + +
+ ({data.rating}) +
+

{data.short_desc}

+
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+ +
+
+ {data.category} +
+ {/* @ts-expect-error ts(2339) */} + {data.title} +
+
+
+ + + + + +
+ ({data.rating}) +
+
    +
  • + {data.lesson}{' '} + {data.lesson + data.lesson > 1 ? 'Lessons' : 'Lesson'} +
  • +
  • {data.duration}
  • +
  • {data.level}
  • +
+
+
What You’ll Learn?
+
    + {data.features.slice(0, 3).map((feature, featurekey) => ( +
  • {feature}
  • + ))} +
+
+
+ handleAddToCart(data)} + style={{ cursor: 'pointer' }} + > + {cartCourses.some(item => item.id === data.id) + ? 'Added to cart' + : 'Add to cart'} + + + + +
+
+
+
+ ); +}; + +export default CourseTypeFour; diff --git a/src/components/course/course-type-one.jsx b/src/components/course/course-type-one.jsx deleted file mode 100644 index f50b401..0000000 --- a/src/components/course/course-type-one.jsx +++ /dev/null @@ -1,124 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; -import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; - -const CourseTypeOne = ({ data, classes, image_location_path='01' }) => { - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - const wishlists = useSelector(wishlistItems); - const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); - - const handleWishlist = (course_item) => { - if (wishlists.find(i => i.id === course_item.id)) { - dispatch( - add_to_wishlist({ - change_type: 'remove_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } else { - dispatch( - add_to_wishlist({ - change_type: 'add_wishlist', item: { - id: course_item.id, - img: `/assets/images/course/course-06/${course_item.img}`, - title: course_item.title, - price: course_item.course_price - } - })) - } - } - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id:course.id, - img:`/assets/images/course/course-06/${course.img}`, - price:course.course_price, - title:course.title - })) - } - - return ( -
-
-
- - - Course Meta - - -
- {data.duration} -
-
-
- {data.level} -
- {data.title} -
-
-
- - - - - -
- ({data.rating} /{data.rating_count} Rating) -
-
${data.course_price}
-
    -
  • {data.lesson} Lessons
  • -
  • {data.student} Students
  • -
-
-
- -
- -
- -
-
- - {data.level} -
- - {data.title} - -
-
-
- - - - - -
- ({data.rating} /{data.rating_count} Rating) -
-
${data.course_price}
-

{data.short_desc}

-
    -
  • {data.lesson} Lessons
  • -
  • {data.student} Students
  • -
- handleAddToCart(data)} className="edu-btn btn-secondary btn-small" style={{ cursor: 'pointer' }}> - {cartCourses.some(item => item.id === data.id) ? 'Added to cart' : 'Add to cart'} - - -
-
-
- ); -} - -export default CourseTypeOne; diff --git a/src/components/course/course-type-one.tsx b/src/components/course/course-type-one.tsx new file mode 100644 index 0000000..16c3d87 --- /dev/null +++ b/src/components/course/course-type-one.tsx @@ -0,0 +1,180 @@ +import Link from 'next/link'; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { add_to_wishlist, wishlistItems } from '../../redux/features/wishlist-slice'; +import { AppState } from '../../redux/store'; + +// TODO: change any +type CourseTypeOneProps = { + data: any; + classes?: string; + image_location_path?: string; +}; + +const CourseTypeOne = ({ + data, + classes, + image_location_path = '01', +}: CourseTypeOneProps) => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + const wishlists = useSelector(wishlistItems); + const isWishlistSelected = wishlists.find(w => Number(w.id) === Number(data.id)); + + const handleWishlist = course_item => { + if (wishlists.find(i => i.id === course_item.id)) { + dispatch( + add_to_wishlist({ + change_type: 'remove_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } else { + dispatch( + add_to_wishlist({ + change_type: 'add_wishlist', + item: { + id: course_item.id, + img: `/assets/images/course/course-06/${course_item.img}`, + title: course_item.title, + price: course_item.course_price, + }, + }) + ); + } + }; + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/course-06/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + + return ( +
+
+
+ + + Course Meta + + +
+ + + {data.duration} + +
+
+
+ {data.level} +
+ {data.title} +
+
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+
${data.course_price}
+
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+ +
+ +
+ +
+
+ + {data.level} +
+ {data.title} +
+
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+
${data.course_price}
+

{data.short_desc}

+
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+ handleAddToCart(data)} + className='edu-btn btn-secondary btn-small' + style={{ cursor: 'pointer' }} + > + {cartCourses.some(item => item.id === data.id) + ? 'Added to cart' + : 'Add to cart'} + + +
+
+
+ ); +}; + +export default CourseTypeOne; diff --git a/src/components/course/course-type-seven.jsx b/src/components/course/course-type-seven.jsx deleted file mode 100644 index 58b1a03..0000000 --- a/src/components/course/course-type-seven.jsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const CourseTypeSeven = ({ data, classes }) => { - return ( -
-
-
- - - Course Meta - - -
${data.course_price}
-
- - - -
-
-
- images -
{data.instructor}
-
-
-
- - - {data.title} - - -
-

{data.short_desc}

-
-
-
- ); -} -export default CourseTypeSeven; \ No newline at end of file diff --git a/src/components/course/course-type-seven.tsx b/src/components/course/course-type-seven.tsx new file mode 100644 index 0000000..2f1b3ba --- /dev/null +++ b/src/components/course/course-type-seven.tsx @@ -0,0 +1,52 @@ +import React from 'react'; +import Link from 'next/link'; + +// TODO: change any +type CourseTypeSevenProps = { + data: any; + classes?: string; +}; + +const CourseTypeSeven = ({ data, classes }: CourseTypeSevenProps) => { + return ( +
+
+
+ + + Course Meta + + +
${data.course_price}
+
+ + + +
+
+
+ + images + +
{data.instructor}
+
+
+
+ {data.title} +
+

{data.short_desc}

+
+
+
+ ); +}; +export default CourseTypeSeven; diff --git a/src/components/course/course-type-six.jsx b/src/components/course/course-type-six.jsx deleted file mode 100644 index 4f5f598..0000000 --- a/src/components/course/course-type-six.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; -import { useDispatch, useSelector } from 'react-redux'; -import { cart_course } from '../../redux/features/cart-slice'; - -const CourseTypeSix = ({ data, classes }) => { - const {cartCourses} = useSelector(state => state.cart); - const dispatch = useDispatch(); - - // handle add to cart - const handleAddToCart = (course) => { - dispatch(cart_course({ - id: course.id, - img: `/assets/images/course/course-06/${course.img}`, - price: course.course_price, - title: course.title - })) - } - return ( -
-
-
- - - Course Meta - - -
- {data.course_outline} -
-
- -
- {data.level} -
- - {data.title} - -
-

{data.short_desc}

-
-
- - - - - -
- ({data.rating} /{data.rating_count} Rating) -
- -
-
-
- ); -} -export default CourseTypeSix; \ No newline at end of file diff --git a/src/components/course/course-type-six.tsx b/src/components/course/course-type-six.tsx new file mode 100644 index 0000000..7140e96 --- /dev/null +++ b/src/components/course/course-type-six.tsx @@ -0,0 +1,83 @@ +import React from 'react'; +import Link from 'next/link'; +import { useDispatch, useSelector } from 'react-redux'; +import { cart_course } from '../../redux/features/cart-slice'; +import { AppState } from '../../redux/store'; + +// TODO: change any +type CourseTypeSixProps = { + data: any; + classes?: string; +}; + +const CourseTypeSix = ({ data, classes }: CourseTypeSixProps) => { + const { cartCourses } = useSelector((state: AppState) => state.cart); + const dispatch = useDispatch(); + + // handle add to cart + const handleAddToCart = course => { + dispatch( + cart_course({ + id: course.id, + img: `/assets/images/course/course-06/${course.img}`, + price: course.course_price, + title: course.title, + }) + ); + }; + return ( +
+
+
+ + + Course Meta + + +
+ + + {data.course_outline} + +
+
+ +
+ {data.level} +
+ {data.title} +
+

{data.short_desc}

+
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+ +
+
+
+ ); +}; +export default CourseTypeSix; diff --git a/src/components/course/course-type-three.jsx b/src/components/course/course-type-three.jsx deleted file mode 100644 index 9ea85a1..0000000 --- a/src/components/course/course-type-three.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const CourseTypeSeven = ({ data, classes }) => { - return ( -
-
-
- - - Course Meta - - -
- {data.duration} -
-
- -
-
${data.course_price}
-
- - {data.title} - -
-
-
- - - - - -
- ({data.rating} /{data.rating_count} Rating) -
-
    -
  • {data.lesson} Lessons
  • -
  • {data.student} Students
  • -
-
-
-
- ); -} -export default CourseTypeSeven; \ No newline at end of file diff --git a/src/components/course/course-type-three.tsx b/src/components/course/course-type-three.tsx new file mode 100644 index 0000000..09ccfe2 --- /dev/null +++ b/src/components/course/course-type-three.tsx @@ -0,0 +1,63 @@ +import React from 'react'; +import Link from 'next/link'; + +// TODO: change any +type CourseTypeSevenProps = { + data: any; + classes?: string; +}; + +const CourseTypeSeven = ({ data, classes }: CourseTypeSevenProps) => { + return ( +
+
+
+ + + Course Meta + + +
+ + + {data.duration} + +
+
+ +
+
${data.course_price}
+
+ {data.title} +
+
+
+ + + + + +
+ + ({data.rating} /{data.rating_count} Rating) + +
+
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+
+ ); +}; +export default CourseTypeSeven; diff --git a/src/components/course/course-type-two.jsx b/src/components/course/course-type-two.jsx deleted file mode 100644 index b63dd0a..0000000 --- a/src/components/course/course-type-two.jsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const CourseTypeTwo = ({ data, classes }) => { - return ( -
-
-
- - - Course Thumb - - -
${Math.trunc(data.course_price)}
-
-
- {data.level} -
- - {data.title} - -
-
    -
  • {data.lesson} Lessons
  • -
  • {data.student} Students
  • -
-
-
-
- ); -} -export default CourseTypeTwo; \ No newline at end of file diff --git a/src/components/course/course-type-two.tsx b/src/components/course/course-type-two.tsx new file mode 100644 index 0000000..cd865aa --- /dev/null +++ b/src/components/course/course-type-two.tsx @@ -0,0 +1,47 @@ +import React from 'react'; +import Link from 'next/link'; + +// TODO: change any +type CourseTypeTwoProps = { + data: any; + classes?: string; +}; + +const CourseTypeTwo = ({ data, classes }: CourseTypeTwoProps) => { + return ( +
+
+
+ + + Course Thumb + + +
+ ${Math.trunc(data.course_price)} +
+
+
+ {data.level} +
+ {data.title} +
+
    +
  • + + {data.lesson} Lessons +
  • +
  • + + {data.student} Students +
  • +
+
+
+
+ ); +}; +export default CourseTypeTwo; diff --git a/src/components/event-details/event-details-area.jsx b/src/components/event-details/event-details-area.jsx deleted file mode 100644 index 32c45db..0000000 --- a/src/components/event-details/event-details-area.jsx +++ /dev/null @@ -1,109 +0,0 @@ -import React from 'react'; -import { instructors_data } from '../../data'; -import Time from '../../utils/time'; -import TeamOne from "../team-member/team-one"; - -const EventDetailsArea = ({event}) => { - return ( -
-
-
-
- Event -
-
-
-
-

About The Event

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor inc idid unt ut labore et dolore magna aliqua enim ad minim veniam, quis nostrud exerec tation ullamco laboris nis aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequuntur magni dolores.

-

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

-
    -
  • Aute irure dolor in reprehenderit
  • -
  • Occaecat cupidatat non proident sunt in culpa
  • -
  • Pariatur enim ipsam.
  • -
-

Event Location

-

Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.

-
    -
  • Newyork City, USA
  • -
  • +012 (345) 6789
  • -
-
- -
-
-
- -
-
-
-
-
-

Event Info

-
    -
  • - Cost: - $70.00 -
  • -
  • - Total Slot: - 30 -
  • -
  • - Booked Slot: - 2 -
  • -
- -
-
-
-
{Time('2023-12-5 00:00:00').days}
-
Days
-
-
-
-
-
{Time('2023-12-5 00:00:00').hours}
-
Hrss
-
-
-
-
-
{Time('2023-12-5 00:00:00').minutes}
-
Mints
-
-
-
-
-
{Time('2023-12-5 00:00:00').seconds}
-
Sec
-
-
-
-
-
-
-
-
-
-
- -
-

Event Speakers

-
- {instructors_data.slice(0,4).map((instructor) => ( -
- -
- ))} -
-
-
-
- ) -} - -export default EventDetailsArea; \ No newline at end of file diff --git a/src/components/event-details/event-details-area.tsx b/src/components/event-details/event-details-area.tsx new file mode 100644 index 0000000..b96ded1 --- /dev/null +++ b/src/components/event-details/event-details-area.tsx @@ -0,0 +1,189 @@ +import React from 'react'; +import { instructors_data } from '../../data'; +import Time from '../../utils/time'; +import TeamOne from '../team-member/team-one'; + +const EventDetailsArea = ({ event }) => { + return ( +
+
+
+
+ + Event + +
+
+
+
+

About The Event

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing + elit, sed do eiusmod tempor inc idid unt ut labore et + dolore magna aliqua enim ad minim veniam, quis nostrud + exerec tation ullamco laboris nis aliquip commodo + consequat. Duis aute irure dolor in reprehenderit in + voluptate velit esse cillum dolore eu fugiat nulla + pariatur enim ipsam voluptatem quia voluptas sit + aspernatur aut odit aut fugit sed quia consequuntur + magni dolores. +

+

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. + Sed ut perspiciatis unde omnis iste natus error sit + voluptatem accusantium doloremque laudantium totam rem + aperiam. +

+
    +
  • Aute irure dolor in reprehenderit
  • +
  • Occaecat cupidatat non proident sunt in culpa
  • +
  • Pariatur enim ipsam.
  • +
+

Event Location

+

+ Excepteur sint occaecat cupidatat non proident sunt in + culpa qui officia deserunt mollit anim id est laborum. + Sed ut perspiciatis unde omnis iste natus error sit + voluptatem accusantium doloremque laudantium totam rem + aperiam.{' '} +

+
    +
  • + Newyork City, USA +
  • +
  • + +012 (345) 6789 +
  • +
+
+ +
+
+
+ +
+
+
+
+
+

Event Info

+
    +
  • + + Cost: + + + $70.00 + +
  • +
  • + + Total + Slot: + + 30 +
  • +
  • + + Booked + Slot: + + 2 +
  • +
+ +
+
+
+
+ { + Time('2023-12-5 00:00:00') + .days + } +
+
+ Days +
+
+
+
+
+
+ { + Time('2023-12-5 00:00:00') + .hours + } +
+
+ Hrss +
+
+
+
+
+
+ { + Time('2023-12-5 00:00:00') + .minutes + } +
+
+ Mints +
+
+
+
+
+
+ { + Time('2023-12-5 00:00:00') + .seconds + } +
+
+ Sec +
+
+
+
+
+
+
+
+
+
+
+ +
+

Event Speakers

+
+ {instructors_data.slice(0, 4).map(instructor => ( +
+ +
+ ))} +
+
+
+
+ ); +}; + +export default EventDetailsArea; diff --git a/src/components/event-details/index.jsx b/src/components/event-details/index.tsx similarity index 50% rename from src/components/event-details/index.jsx rename to src/components/event-details/index.tsx index 5b4fdba..56f89b1 100644 --- a/src/components/event-details/index.jsx +++ b/src/components/event-details/index.tsx @@ -3,17 +3,22 @@ import { Footer, Header } from '../../layout'; import BreadcrumbFour from '../breadcrumb/breadcrumb-4'; import EventDetailsArea from './event-details-area'; -const index = ({event}) => { +const index = ({ event }) => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/event-grid/all-events.jsx b/src/components/event-grid/all-events.tsx similarity index 66% rename from src/components/event-grid/all-events.jsx rename to src/components/event-grid/all-events.tsx index c4887a9..16b6309 100644 --- a/src/components/event-grid/all-events.jsx +++ b/src/components/event-grid/all-events.tsx @@ -13,24 +13,25 @@ const AllEvents = ({ itemsPerPage, items }) => { setPageCount(Math.ceil(items.length / itemsPerPage)); }, [itemOffset, itemsPerPage, items]); // handlePageClick - const handlePageClick = (event) => { + const handlePageClick = event => { const newOffset = (event.selected * itemsPerPage) % items.length; setItemOffset(newOffset); }; return ( <> - {currentItems && currentItems.map((item, i) => { - return ( -
-
- + {currentItems && + currentItems.map((item, i) => { + return ( +
+
+ +
-
- ) - })} + ); + })} - ) -} + ); +}; -export default AllEvents; \ No newline at end of file +export default AllEvents; diff --git a/src/components/event-grid/event-area.jsx b/src/components/event-grid/event-area.tsx similarity index 57% rename from src/components/event-grid/event-area.jsx rename to src/components/event-grid/event-area.tsx index 9d7a1e2..7d10c1b 100644 --- a/src/components/event-grid/event-area.jsx +++ b/src/components/event-grid/event-area.tsx @@ -6,16 +6,16 @@ const event_items = event_data.filter(event => event.event_grid); const EventArea = () => { return ( -
-
-
-
+
+
+
+
- ) -} + ); +}; -export default EventArea; \ No newline at end of file +export default EventArea; diff --git a/src/components/event-grid/event-item.jsx b/src/components/event-grid/event-item.jsx deleted file mode 100644 index 01fc4fb..0000000 --- a/src/components/event-grid/event-item.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; - -const EventItem = ({ item }) => { - const { id, date, event_meta, img, sm_desc, time, title } = item || {}; - return ( -
-
- - - Blog Images - - -
- {time} -
-
-
-
- {date?.split(' ')[1]} - {date?.split(' ')[0]} -
-
- - {title} - -
-

{sm_desc}

-
    -
  • {event_meta}
  • -
-
- - Learn More - - -
-
-
- ); -} - -export default EventItem; \ No newline at end of file diff --git a/src/components/event-grid/event-item.tsx b/src/components/event-grid/event-item.tsx new file mode 100644 index 0000000..5b63363 --- /dev/null +++ b/src/components/event-grid/event-item.tsx @@ -0,0 +1,49 @@ +import Link from 'next/link'; +import React from 'react'; + +const EventItem = ({ item }) => { + const { id, date, event_meta, img, sm_desc, time, title } = item || {}; + return ( +
+
+ + + Blog Images + + +
+ + + {time} + +
+
+
+
+ {date?.split(' ')[1]} + {date?.split(' ')[0]} +
+
+ {title} +
+

{sm_desc}

+
    +
  • + + {event_meta} +
  • +
+
+ + Learn More + +
+
+
+ ); +}; + +export default EventItem; diff --git a/src/components/event-grid/index.jsx b/src/components/event-grid/index.tsx similarity index 66% rename from src/components/event-grid/index.jsx rename to src/components/event-grid/index.tsx index fd0bba8..414afbd 100644 --- a/src/components/event-grid/index.jsx +++ b/src/components/event-grid/index.tsx @@ -3,18 +3,17 @@ import { Footer, Header } from '../../layout'; import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import EventArea from './event-area'; - const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/event-list/event-list-area.jsx b/src/components/event-list/event-list-area.jsx deleted file mode 100644 index cad9c93..0000000 --- a/src/components/event-list/event-list-area.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import { useSelector } from "react-redux"; -import { event_data } from "../../data"; -import EventListItem from "./event-list-item"; -import EventSidebar from "./event-sidebar"; - -const event_lists = event_data.filter(event => event.event_list); - -const EventListArea = () => { - const { categories } = useSelector((state) => state.event); - const filterData = event_lists?.filter((item1) => - categories?.length !== 0 - ? categories?.some((item2) => item1.category == item2) - : item1 - ); - - return ( -
-
-
-
- -
-
-
- {filterData?.length !== 0 && filterData?.map((list, i) => ( -
-
- -
-
- ))} -
-
-
- - -
-
- ) -} - -export default EventListArea; \ No newline at end of file diff --git a/src/components/event-list/event-list-area.tsx b/src/components/event-list/event-list-area.tsx new file mode 100644 index 0000000..d21a03d --- /dev/null +++ b/src/components/event-list/event-list-area.tsx @@ -0,0 +1,70 @@ +import { useSelector } from 'react-redux'; +import { event_data } from '../../data'; +import EventListItem from './event-list-item'; +import EventSidebar from './event-sidebar'; +import { AppState } from '../../redux/store'; + +const event_lists = event_data.filter(event => event.event_list); + +const EventListArea = () => { + const { categories } = useSelector((state: AppState) => state.event); + const filterData = event_lists?.filter(item1 => + categories?.length !== 0 + ? categories?.some(item2 => item1.category == item2) + : item1 + ); + + return ( +
+
+
+
+ +
+
+
+ {filterData?.length !== 0 && + filterData?.map((list, i) => ( +
+
+ +
+
+ ))} +
+
+
+ + +
+
+ ); +}; + +export default EventListArea; diff --git a/src/components/event-list/event-list-item.jsx b/src/components/event-list/event-list-item.jsx deleted file mode 100644 index 91117ad..0000000 --- a/src/components/event-list/event-list-item.jsx +++ /dev/null @@ -1,38 +0,0 @@ -import Link from 'next/link'; -import React from 'react'; - -const EventListItem = ({ item }) => { - const { id, img, date, time, title, sm_desc, event_meta } = item || {}; - return ( -
-
- - - Event Images - - -
-
-
    -
  • {date}
  • -
  • {time}
  • -
-

- - {title} - -

- {event_meta} -

{sm_desc}

-
- - Learn More - - -
-
-
- ); -} - -export default EventListItem; \ No newline at end of file diff --git a/src/components/event-list/event-list-item.tsx b/src/components/event-list/event-list-item.tsx new file mode 100644 index 0000000..e4c0c5d --- /dev/null +++ b/src/components/event-list/event-list-item.tsx @@ -0,0 +1,47 @@ +import Link from 'next/link'; +import React from 'react'; + +const EventListItem = ({ item }) => { + const { id, img, date, time, title, sm_desc, event_meta } = item || {}; + return ( +
+
+ + + Event Images + + +
+
+
    +
  • + + {date} +
  • +
  • + + {time} +
  • +
+

+ {title} +

+ + + {event_meta} + +

{sm_desc}

+
+ + Learn More + +
+
+
+ ); +}; + +export default EventListItem; diff --git a/src/components/event-list/event-sidebar.jsx b/src/components/event-list/event-sidebar.jsx deleted file mode 100644 index 8d63a68..0000000 --- a/src/components/event-list/event-sidebar.jsx +++ /dev/null @@ -1,97 +0,0 @@ -import React from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { add_category } from '../../redux/features/event-slice'; - -const all_categories = ['Art & Design', 'Development', 'Business', 'Marketing'] - -const EventSidebar = () => { - const { categories } = useSelector(state => state.event); - const dispatch = useDispatch(); - // handleCategory - const handleCategory = (cate) => { - const index = categories.findIndex(item => item === cate); - if (index >= 0) { - dispatch(add_category({changeType: 'remove',item: cate})) - } else { - dispatch(add_category({changeType: 'added',item: cate})) - } - } - - return ( -
-
-
-
Categories
-
- {all_categories.map((c, i) => ( -
- handleCategory(c)} type="checkbox" id={`cat-check${i + 1}`} /> - -
- ))} -
-
-
-
-
-
Date
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
Cities
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
- ) -} - -export default EventSidebar; \ No newline at end of file diff --git a/src/components/event-list/event-sidebar.tsx b/src/components/event-list/event-sidebar.tsx new file mode 100644 index 0000000..be3de24 --- /dev/null +++ b/src/components/event-list/event-sidebar.tsx @@ -0,0 +1,102 @@ +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { add_category } from '../../redux/features/event-slice'; +import { AppState } from '../../redux/store'; + +const all_categories = ['Art & Design', 'Development', 'Business', 'Marketing']; + +const EventSidebar = () => { + const { categories } = useSelector((state: AppState) => state.event); + const dispatch = useDispatch(); + // handleCategory + const handleCategory = cate => { + const index = categories.findIndex(item => item === cate); + if (index >= 0) { + dispatch(add_category({ changeType: 'remove', item: cate })); + } else { + dispatch(add_category({ changeType: 'added', item: cate })); + } + }; + + return ( +
+
+
+
Categories
+
+ {all_categories.map((c, i) => ( +
+ handleCategory(c)} + type='checkbox' + id={`cat-check${i + 1}`} + /> + +
+ ))} +
+
+
+
+
+
Date
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
Cities
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ ); +}; + +export default EventSidebar; diff --git a/src/components/event-list/index.jsx b/src/components/event-list/index.tsx similarity index 67% rename from src/components/event-list/index.jsx rename to src/components/event-list/index.tsx index f308a8e..0a0585f 100644 --- a/src/components/event-list/index.jsx +++ b/src/components/event-list/index.tsx @@ -3,18 +3,17 @@ import { Footer, Header } from '../../layout'; import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import EventListArea from './event-list-area'; - const index = () => { return (
-
+
- - + +
- ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/faq/faq-area.jsx b/src/components/faq/faq-area.jsx deleted file mode 100644 index 5005900..0000000 --- a/src/components/faq/faq-area.jsx +++ /dev/null @@ -1,133 +0,0 @@ -import React from 'react'; -import SingleFaq from './single-faq'; - -function NavTab({ active = false, id, title }) { - return ( -
  • - -
  • - ) -} - -const FaqArea = () => { - return ( -
    -
    -
    -
    -
    -

    Questions By This Category

    -

    Lorem ipsum dolor sit amet consectur adipiscing elit sed eius mod ex tempor incididunt labore.

    - -
      - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - - - - - - - -
    -
    -
    -
    -
    -
    - - - - - - - -
    -
    -
    -
    -
    -
    - - - - - - - -
    -
    -
    -
    -
    -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - ) -} - -export default FaqArea; \ No newline at end of file diff --git a/src/components/faq/faq-area.tsx b/src/components/faq/faq-area.tsx new file mode 100644 index 0000000..69213f4 --- /dev/null +++ b/src/components/faq/faq-area.tsx @@ -0,0 +1,289 @@ +import React from 'react'; +import SingleFaq from './single-faq'; + +function NavTab({ active = false, id, title }) { + return ( +
  • + +
  • + ); +} + +const FaqArea = () => { + return ( +
    +
    +
    +
    +
    +

    Questions By This Category

    +

    + Lorem ipsum dolor sit amet consectur adipiscing elit sed + eius mod ex tempor incididunt labore. +

    + +
      + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + ); +}; + +export default FaqArea; diff --git a/src/components/faq/index.jsx b/src/components/faq/index.tsx similarity index 54% rename from src/components/faq/index.jsx rename to src/components/faq/index.tsx index 625399e..d1aceb3 100644 --- a/src/components/faq/index.jsx +++ b/src/components/faq/index.tsx @@ -3,18 +3,20 @@ import { Footer, Header } from '../../layout'; import BreadcrumbThree from '../breadcrumb/breadcrumb-3'; import FaqArea from './faq-area'; - -const index = ({team}) => { +const index = () => { return (
    -
    +
    - - + +
    - ) -} + ); +}; -export default index; \ No newline at end of file +export default index; diff --git a/src/components/faq/single-faq.jsx b/src/components/faq/single-faq.jsx deleted file mode 100644 index 5cd8a81..0000000 --- a/src/components/faq/single-faq.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; - -const SingleFaq = ({show=false,id,title,desc}) => { - return ( -
    -
    - -
    -
    -
    -

    {desc}

    -
    -
    -
    - ) -} - -export default SingleFaq; \ No newline at end of file diff --git a/src/components/faq/single-faq.tsx b/src/components/faq/single-faq.tsx new file mode 100644 index 0000000..72b21f8 --- /dev/null +++ b/src/components/faq/single-faq.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +const SingleFaq = ({ show = false, id, title, desc }) => { + return ( +
    +
    + +
    +
    +
    +

    {desc}

    +
    +
    +
    + ); +}; + +export default SingleFaq; diff --git a/src/components/forms/blog-comment-form.jsx b/src/components/forms/blog-comment-form.jsx deleted file mode 100644 index 55d0705..0000000 --- a/src/components/forms/blog-comment-form.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import { useFormik } from 'formik'; -import React from 'react'; -import { blogCommentSchema } from '../../utils/validation-schema'; -import ErrorMsg from './error-msg'; - -const BlogCommentForm = () => { - const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik({ - initialValues: { name: '', email: '', msg: '' }, - validationSchema: blogCommentSchema, - onSubmit: (values, { resetForm }) => { - toast.success(`${values.name} your comment added successfully`, { - position: 'top-left' - }) - resetForm() - } - }) - - return ( -
    -
    -
    - - {touched.name && } -
    - -
    - - {touched.email && } -
    - -
    - - {touched.msg && } -
    - -
    -
    - - -
    -
    -
    - -
    -
    -
    - ) -} - -export default BlogCommentForm; \ No newline at end of file diff --git a/src/components/forms/blog-comment-form.tsx b/src/components/forms/blog-comment-form.tsx new file mode 100644 index 0000000..bba6e3f --- /dev/null +++ b/src/components/forms/blog-comment-form.tsx @@ -0,0 +1,83 @@ +import { useFormik } from 'formik'; +import React from 'react'; +import { blogCommentSchema } from '../../utils/validation-schema'; +import ErrorMsg from './error-msg'; +import { toast } from 'react-toastify'; + +const BlogCommentForm = () => { + const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik( + { + initialValues: { name: '', email: '', msg: '' }, + validationSchema: blogCommentSchema, + onSubmit: (values, { resetForm }) => { + toast.success(`${values.name} your comment added successfully`, { + position: 'top-left', + }); + resetForm(); + }, + } + ); + + return ( +
    +
    +
    + + {touched.name && } +
    + +
    + + {touched.email && } +
    + +
    + + {touched.msg && } +
    + +
    +
    + + +
    +
    +
    + +
    +
    +
    + ); +}; + +export default BlogCommentForm; diff --git a/src/components/forms/comment-form-course.jsx b/src/components/forms/comment-form-course.jsx deleted file mode 100644 index 28a070a..0000000 --- a/src/components/forms/comment-form-course.jsx +++ /dev/null @@ -1,49 +0,0 @@ -import { useFormik } from 'formik'; -import React from 'react'; -import { courseSchema } from '../../utils/validation-schema'; -import ErrorMsg from './error-msg'; - -const CommentFormCourse = () => { - const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik({ - initialValues: { title:'',name: '', email: '', msg: '' }, - validationSchema: courseSchema, - onSubmit: (values, { resetForm }) => { - toast.success(`${values.name} your review added successfully`, { - position: 'top-left' - }) - resetForm() - } - }) - - return ( -
    -
    -
    - - {touched.title && } -
    - -
    - - {touched.name && } -
    - -
    - - {touched.email && } -
    - -
    - - {touched.msg && } -
    - -
    - -
    -
    -
    - ) -} - -export default CommentFormCourse; \ No newline at end of file diff --git a/src/components/forms/comment-form-course.tsx b/src/components/forms/comment-form-course.tsx new file mode 100644 index 0000000..3af52ba --- /dev/null +++ b/src/components/forms/comment-form-course.tsx @@ -0,0 +1,87 @@ +import { useFormik } from 'formik'; +import React from 'react'; +import { courseSchema } from '../../utils/validation-schema'; +import ErrorMsg from './error-msg'; +import { toast } from 'react-toastify'; + +const CommentFormCourse = () => { + const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik( + { + initialValues: { title: '', name: '', email: '', msg: '' }, + validationSchema: courseSchema, + onSubmit: (values, { resetForm }) => { + toast.success(`${values.name} your review added successfully`, { + position: 'top-left', + }); + resetForm(); + }, + } + ); + + return ( +
    +
    +
    + + {touched.title && } +
    + +
    + + {touched.name && } +
    + +
    + + {touched.email && } +
    + +
    + + {touched.msg && } +
    + +
    + +
    +
    +
    + ); +}; + +export default CommentFormCourse; diff --git a/src/components/forms/contact-me-form.jsx b/src/components/forms/contact-me-form.jsx deleted file mode 100644 index b6a18b6..0000000 --- a/src/components/forms/contact-me-form.jsx +++ /dev/null @@ -1,63 +0,0 @@ -import React , { useState } from 'react'; -import emailjs from 'emailjs-com'; - -const Result = () => { - return ( -

    Thanks for your query. We will contact with you soon.

    - ) -} - -const ContactMeForm = () => { - const [result, setResult] = useState( false ); - - const sendEmail = ( e ) => { - e.preventDefault(); - emailjs - .sendForm( - 'service_bxh6md3', - 'template_1g7v07n', - e.target, - 'user_8Lx0gfI1ktOoeEN8DTV10' - ) - .then( ( result ) => { - console.log( result.text ); - }, - ( error ) => { - console.log( error.text ); - } - ); - e.target.reset(); - setResult( true ); - }; - - setTimeout(() => { - setResult( false ); - }, 5000); - - return ( -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    - { result ?
    : null } -
    -
    - ) -} - -export default ContactMeForm; \ No newline at end of file diff --git a/src/components/forms/contact-me-form.tsx b/src/components/forms/contact-me-form.tsx new file mode 100644 index 0000000..75b4727 --- /dev/null +++ b/src/components/forms/contact-me-form.tsx @@ -0,0 +1,92 @@ +import React, { useState } from 'react'; +import emailjs from 'emailjs-com'; + +const Result = () => { + return ( +

    + Thanks for your query. We will contact with you soon. +

    + ); +}; + +const ContactMeForm = () => { + const [result, setResult] = useState(false); + + const sendEmail = e => { + e.preventDefault(); + emailjs + .sendForm( + 'service_bxh6md3', + 'template_1g7v07n', + e.target, + 'user_8Lx0gfI1ktOoeEN8DTV10' + ) + .then( + result => { + console.log(result.text); + }, + error => { + console.log(error.text); + } + ); + e.target.reset(); + setResult(true); + }; + + setTimeout(() => { + setResult(false); + }, 5000); + + return ( +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + {result ? ( +
    + +
    + ) : null} +
    +
    + ); +}; + +export default ContactMeForm; diff --git a/src/components/forms/contact-us-form.jsx b/src/components/forms/contact-us-form.jsx deleted file mode 100644 index 918e9f8..0000000 --- a/src/components/forms/contact-us-form.jsx +++ /dev/null @@ -1,61 +0,0 @@ -import React , { useState } from 'react'; -import emailjs from 'emailjs-com'; - -const Result = () => { - return ( -

    Thanks for your query. We will contact with you soon.

    - ) -} - -const ContactUsForm = () => { - const [result, setResult] = useState( false ); - - const sendEmail = ( e ) => { - e.preventDefault(); - emailjs - .sendForm( - 'service_bxh6md3', - 'template_1g7v07n', - e.target, - 'user_8Lx0gfI1ktOoeEN8DTV10' - ) - .then( ( result ) => { - console.log( result.text ); - }, - ( error ) => { - console.log( error.text ); - } - ); - e.target.reset(); - setResult( true ); - }; - - setTimeout(() => { - setResult( false ); - }, 5000); - - return ( -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    - { result ?
    : null } -
    -
    - ) -} - -export default ContactUsForm; \ No newline at end of file diff --git a/src/components/forms/contact-us-form.tsx b/src/components/forms/contact-us-form.tsx new file mode 100644 index 0000000..dbb198a --- /dev/null +++ b/src/components/forms/contact-us-form.tsx @@ -0,0 +1,96 @@ +import React, { useState } from 'react'; +import emailjs from 'emailjs-com'; + +const Result = () => { + return ( +

    + Thanks for your query. We will contact with you soon. +

    + ); +}; + +const ContactUsForm = () => { + const [result, setResult] = useState(false); + + const sendEmail = e => { + e.preventDefault(); + emailjs + .sendForm( + 'service_bxh6md3', + 'template_1g7v07n', + e.target, + 'user_8Lx0gfI1ktOoeEN8DTV10' + ) + .then( + result => { + console.log(result.text); + }, + error => { + console.log(error.text); + } + ); + e.target.reset(); + setResult(true); + }; + + setTimeout(() => { + setResult(false); + }, 5000); + + return ( +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + {result ? ( +
    + +
    + ) : null} +
    +
    + ); +}; + +export default ContactUsForm; diff --git a/src/components/forms/error-msg.jsx b/src/components/forms/error-msg.jsx deleted file mode 100644 index 0ed1254..0000000 --- a/src/components/forms/error-msg.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -const ErrorMsg = ({error}) => { - return ( - <> -

    {error}

    - - ) -} - -export default ErrorMsg; \ No newline at end of file diff --git a/src/components/forms/error-msg.tsx b/src/components/forms/error-msg.tsx new file mode 100644 index 0000000..299abdf --- /dev/null +++ b/src/components/forms/error-msg.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +const ErrorMsg = ({ error }) => { + return ( + <> +

    {error}

    + + ); +}; + +export default ErrorMsg; diff --git a/src/components/forms/login-form.jsx b/src/components/forms/login-form.jsx deleted file mode 100644 index 6cab3ba..0000000 --- a/src/components/forms/login-form.jsx +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react'; -import { useFormik } from 'formik'; -import useFirebase from '../../hooks/use-firebase'; -import { loginSchema } from '../../utils/validation-schema'; -import ErrorMsg from './error-msg'; -import { useState } from 'react'; - -const LoginForm = () => { - const [showPass,setShowPass] = useState(false); - // use firebase - const { loginWithEmailPassword, resetPassword } = useFirebase(); - // use formik - const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik({ - initialValues: { email: '', password: '' }, - validationSchema: loginSchema, - onSubmit: (values, { resetForm }) => { - loginWithEmailPassword(values.email, values.password) - resetForm() - } - }) - - // handleResetPass - const handleResetPass = (email) => { - resetPassword(email); - } - return ( -
    -
    - - - {touched.email && } -
    - -
    - - - setShowPass(!showPass)} className="password-show"> - - -
    - {touched.password && } - - - -
    - -
    - - ) -} - -export default LoginForm; \ No newline at end of file diff --git a/src/components/forms/login-form.tsx b/src/components/forms/login-form.tsx new file mode 100644 index 0000000..1f04c33 --- /dev/null +++ b/src/components/forms/login-form.tsx @@ -0,0 +1,110 @@ +import React from 'react'; +import { useFormik } from 'formik'; +import { loginSchema } from '../../utils/validation-schema'; +import ErrorMsg from './error-msg'; +import { useState } from 'react'; +import { useLoginMutation } from '../../redux/features/api-slice'; +import { signIn } from '../../redux/features/auth-slice'; +import { useDispatch } from 'react-redux'; + +const LoginForm = () => { + const [showPass, setShowPass] = useState(false); + const [formError, setFormError] = useState(false); + // use firebase + const [login] = useLoginMutation(); + const dispatch = useDispatch(); + // use formik + const { + handleChange, + handleSubmit, + handleBlur, + errors, + values, + touched, + isSubmitting, + } = useFormik({ + initialValues: { email: '', password: '' }, + validationSchema: loginSchema, + onSubmit: async (values, { resetForm }) => { + setFormError(false); + const res = await login({ + username: values.email, + password: values.password, + }); + + if ('error' in res) { + setFormError(true); + return; + } + + console.log(res); + dispatch(signIn(res.data.authToken)); + + resetForm(); + }, + }); + + // handleResetPass + const handleResetPass = (email: string) => { + // resetPassword(email); + }; + return ( +
    +
    + + + {touched.email && } +
    + +
    + + + setShowPass(!showPass)} className='password-show'> + + +
    + {touched.password && } + + + {formError && } + +
    + +
    + + ); +}; + +export default LoginForm; diff --git a/src/components/forms/product-comment-form.jsx b/src/components/forms/product-comment-form.jsx deleted file mode 100644 index 61213f7..0000000 --- a/src/components/forms/product-comment-form.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; - -const ProductCommentForm = () => { - return ( -
    -
    -
    Your Rating
    -
    - - - - - -
    -
    - -
    -
    - - -
    - -
    - - -
    - -
    - - -
    - -
    -
    - - -
    -
    - -
    - -
    -
    -
    - ) -} - -export default ProductCommentForm; \ No newline at end of file diff --git a/src/components/forms/product-comment-form.tsx b/src/components/forms/product-comment-form.tsx new file mode 100644 index 0000000..40b184f --- /dev/null +++ b/src/components/forms/product-comment-form.tsx @@ -0,0 +1,58 @@ +import React from 'react'; + +const ProductCommentForm = () => { + return ( +
    +
    +
    Your Rating
    +
    + + + + + +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +
    + + +
    +
    + +
    + +
    +
    +
    + ); +}; + +export default ProductCommentForm; diff --git a/src/components/forms/register-form.jsx b/src/components/forms/register-form.jsx deleted file mode 100644 index 81c2241..0000000 --- a/src/components/forms/register-form.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import { useFormik } from 'formik'; -import useFirebase from '../../hooks/use-firebase'; -import { registerSchema } from '../../utils/validation-schema'; -import ErrorMsg from './error-msg'; -import Link from 'next/link'; -import { useState } from 'react'; - -const RegisterForm = () => { - const [showPass, setShowPass] = useState(false); - // register With Email Password - const { registerWithEmailPassword } = useFirebase(); - // use formik - const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik({ - initialValues: { name: '', email: '', password: '', terms: false }, - validationSchema: registerSchema, - onSubmit: (values, { resetForm }) => { - registerWithEmailPassword(values.email, values.password, values.name) - resetForm() - } - }) - return ( -
    -
    - - - {touched.name && } -
    - -
    - - - {touched.email && } -
    - -
    - - - setShowPass(!showPass)} className="password-show"> -
    - {touched.password && } - -
    -
    - - -
    -
    - {touched.terms && } - -
    - -
    - - ); -} - -export default RegisterForm; \ No newline at end of file diff --git a/src/components/forms/register-form.tsx b/src/components/forms/register-form.tsx new file mode 100644 index 0000000..01db49a --- /dev/null +++ b/src/components/forms/register-form.tsx @@ -0,0 +1,102 @@ +import React from 'react'; +import { useFormik } from 'formik'; +import { registerSchema } from '../../utils/validation-schema'; +import ErrorMsg from './error-msg'; +import Link from 'next/link'; +import { useState } from 'react'; +import { useRegisterMutation } from '../../redux/features/api-slice'; + +const RegisterForm = () => { + const [showPass, setShowPass] = useState(false); + // register With Email Password + const [register] = useRegisterMutation(); + // use formik + const { handleChange, handleSubmit, handleBlur, errors, values, touched } = useFormik( + { + initialValues: { name: '', email: '', password: '', terms: false }, + validationSchema: registerSchema, + onSubmit: async (values, { resetForm }) => { + await register({ + email: values.email, + username: values.name, + password: values.password, + }); + resetForm(); + }, + } + ); + return ( +
    +
    + + + {touched.name && } +
    + +
    + + + {touched.email && } +
    + +
    + + + setShowPass(!showPass)} className='password-show'> + + +
    + {touched.password && } + +
    +
    + + +
    +
    + {touched.terms && } + +
    + +
    + + ); +}; + +export default RegisterForm; diff --git a/src/components/forms/writing-evaluation-form.jsx b/src/components/forms/writing-evaluation-form.jsx deleted file mode 100644 index 1228171..0000000 --- a/src/components/forms/writing-evaluation-form.jsx +++ /dev/null @@ -1,152 +0,0 @@ -import React, {useState} from 'react'; -import '../../utils/jquery'; - -const WritingEvaluationForm = () => { - const [essay, setEssay] = useState(''); - const [task, setTask] = useState(''); - - const [loading, setLoading] = useState(false); - const [response, setResponse] = useState(null); - const [error, setError] = useState(null); - - const handleSubmit = async (e) => { - e.preventDefault(); - - setLoading(true); - - const demo = false; - - const response = await fetch('https://TSTPrep-tstprep-writing.hf.space/get_passage_html', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer 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' - }, - body: JSON.stringify({ - essay, - task, - demo - }) - }); - if (!response.ok) throw new Error(response.statusText); - - - const item = await response.json(); - - console.log(item); - - setResponse(item.passage_html + item.indicator_html); - setLoading(false); - - } - - const toggleSubmenu = (e) => { - e.preventDefault(); - let el = e.target; - - while (el && el !== e.currentTarget && el.tagName !== "A") { - el = el.parentNode; - } - if (el && el.tagName === "A") { - - /** - * Show the UL next to the A tag - */ - let siblingUl = el.nextSibling; - if (siblingUl) { - - el.nextSibling.classList.toggle('active'); - - - /** - * Show the sentences for the current A tag - */ - if (el.classList.contains('waf-trigger-level1')) { - - let triggers = siblingUl.querySelectorAll('a.waf-trigger-sentence'), - targets = document.querySelectorAll(`.content-box.hovertextp span`); - - - triggers.forEach((trigger) => { - - trigger.addEventListener('click', (e) => { - e.preventDefault(); - - targets.forEach((target) => { - target.classList.remove('opaque'); - }); - - let target = document.querySelector(`.content-box.hovertextp span.${trigger.dataset.sentence}`); - target.classList.add('opaque'); - - console.log(target) - }) - - }); - } - } - } - } - - return ( - - <> - {loading &&

    Loading...

    } - - {response &&
    toggleSubmenu(e)} - />} - - {error &&

    {error}

    } - - - {!error && !response && -
    - - -
    - -