diff --git a/frontend/src/components/core/Dashboard/Cart/Cart.jsx b/frontend/src/components/core/Dashboard/Cart/Cart.jsx
index be92b34..b53ebfa 100644
--- a/frontend/src/components/core/Dashboard/Cart/Cart.jsx
+++ b/frontend/src/components/core/Dashboard/Cart/Cart.jsx
@@ -1,6 +1,6 @@
-import { useSelector } from 'react-redux'
-import RenderCartCourses from './RenderCartCourses'
-import RenderTotalAmount from './RenderTotalAmount'
+import { useSelector } from "react-redux"
+import RenderCartCourses from "./RenderCartCourses"
+import RenderTotalAmount from "./RenderTotalAmount"
export default function Cart () {
const { total, totalItems } = useSelector((state) => state.cart)
@@ -9,8 +9,8 @@ export default function Cart () {
<>
Cart
- {' '}
- {totalItems} Courses in Cart{' '}
+ {" "}
+ {totalItems} Courses in Cart{" "}
{total > 0
@@ -22,8 +22,8 @@ export default function Cart () {
)
: (
- {' '}
- Your cart is empty{' '}
+ {" "}
+ Your cart is empty{" "}
)}
>
diff --git a/frontend/src/components/core/Dashboard/Cart/RenderCartCourses.jsx b/frontend/src/components/core/Dashboard/Cart/RenderCartCourses.jsx
index 3a816e7..2af6ad4 100644
--- a/frontend/src/components/core/Dashboard/Cart/RenderCartCourses.jsx
+++ b/frontend/src/components/core/Dashboard/Cart/RenderCartCourses.jsx
@@ -1,9 +1,9 @@
-import { FaStar } from 'react-icons/fa'
-import { RiDeleteBin6Line } from 'react-icons/ri'
-import ReactStars from 'react-rating-stars-component'
-import { useDispatch, useSelector } from 'react-redux'
-import { removeFromCart } from '../../../../slices/cartSlice'
-import { removeCourseFromCart } from '../../../../services/operations/courseDetailsAPI'
+import { FaStar } from "react-icons/fa"
+import { RiDeleteBin6Line } from "react-icons/ri"
+import ReactStars from "react-rating-stars-component"
+import { useDispatch, useSelector } from "react-redux"
+import { removeFromCart } from "../../../../slices/cartSlice"
+import { removeCourseFromCart } from "../../../../services/operations/courseDetailsAPI"
export default function RenderCartCourses () {
const { cart } = useSelector((state) => state.cart)
@@ -16,8 +16,8 @@ export default function RenderCartCourses () {
{cart.map((course, indx) => (
- {' '}
- {course?.courseName}{' '}
+ {" "}
+ {course?.courseName}{" "}
- {' '}
- {course?.category?.name}{' '}
+ {" "}
+ {course?.category?.name}{" "}
4.5
@@ -46,8 +46,8 @@ export default function RenderCartCourses () {
fullIcon={ }
/>
- {' '}
- {course?.ratingAndReviews?.length} Ratings{' '}
+ {" "}
+ {course?.ratingAndReviews?.length} Ratings{" "}
@@ -66,8 +66,8 @@ export default function RenderCartCourses () {
Remove
- {' '}
- ₹ {course?.price}{' '}
+ {" "}
+ ₹ {course?.price}{" "}
diff --git a/frontend/src/components/core/Dashboard/Cart/RenderTotalAmount.jsx b/frontend/src/components/core/Dashboard/Cart/RenderTotalAmount.jsx
index fcc7f88..d5d91a5 100644
--- a/frontend/src/components/core/Dashboard/Cart/RenderTotalAmount.jsx
+++ b/frontend/src/components/core/Dashboard/Cart/RenderTotalAmount.jsx
@@ -1,7 +1,7 @@
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import IconBtn from '../../../common/IconBtn'
-import { buyCourse } from '../../../../services/operations/studentFeaturesAPI.js'
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import IconBtn from "../../../common/IconBtn"
+import { buyCourse } from "../../../../services/operations/studentFeaturesAPI.js"
export default function RenderTotalAmount () {
const { total, cart } = useSelector((state) => state.cart)
diff --git a/frontend/src/components/core/Dashboard/EditCourse/index.jsx b/frontend/src/components/core/Dashboard/EditCourse/index.jsx
index 06adc35..2198adc 100644
--- a/frontend/src/components/core/Dashboard/EditCourse/index.jsx
+++ b/frontend/src/components/core/Dashboard/EditCourse/index.jsx
@@ -1,10 +1,10 @@
-import { useEffect, useState } from 'react'
-import { useDispatch, useSelector } from 'react-redux'
-import { useParams } from 'react-router-dom'
+import { useEffect, useState } from "react"
+import { useDispatch, useSelector } from "react-redux"
+import { useParams } from "react-router-dom"
-import { getFullDetailsOfCourse } from '../../../../services/operations/courseDetailsAPI'
-import { setCourse, setEditCourse } from '../../../../slices/courseSlice'
-import RenderSteps from '../AddCourse/RenderSteps'
+import { getFullDetailsOfCourse } from "../../../../services/operations/courseDetailsAPI"
+import { setCourse, setEditCourse } from "../../../../slices/courseSlice"
+import RenderSteps from "../AddCourse/RenderSteps"
export default function EditCourse () {
const dispatch = useDispatch()
@@ -36,8 +36,8 @@ export default function EditCourse () {
return (
- {' '}
- Edit Course{' '}
+ {" "}
+ Edit Course{" "}
{course
@@ -46,8 +46,8 @@ export default function EditCourse () {
)
: (
- {' '}
- Course not found{' '}
+ {" "}
+ Course not found{" "}
)}
diff --git a/frontend/src/components/core/Dashboard/EnrolledCourses.jsx b/frontend/src/components/core/Dashboard/EnrolledCourses.jsx
index c482b98..1fe851e 100644
--- a/frontend/src/components/core/Dashboard/EnrolledCourses.jsx
+++ b/frontend/src/components/core/Dashboard/EnrolledCourses.jsx
@@ -1,8 +1,8 @@
-import { useEffect, useState } from 'react'
-import ProgressBar from '@ramonak/react-progress-bar'
-import { useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { getUserEnrolledCourses } from '../../../services/operations/profileAPI'
+import { useEffect, useState } from "react"
+import ProgressBar from "@ramonak/react-progress-bar"
+import { useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { getUserEnrolledCourses } from "../../../services/operations/profileAPI"
export default function EnrolledCourses () {
const { token } = useSelector((state) => state.auth)
@@ -14,7 +14,7 @@ export default function EnrolledCourses () {
const res = await getUserEnrolledCourses(token)
setEnrolledCourses(res)
} catch (error) {
- console.log('Could not fetch enrolled courses.')
+ console.log("Could not fetch enrolled courses.")
}
}
@@ -34,8 +34,8 @@ export default function EnrolledCourses () {
: !enrolledCourses.length
? (
- {' '}
- You have not enrolled in any course yet.{' '}
+ {" "}
+ You have not enrolled in any course yet.{" "}
)
: (
@@ -49,7 +49,7 @@ export default function EnrolledCourses () {
{/* Course Names */}
{enrolledCourses.map((course, i, arr) => (
@@ -82,7 +82,7 @@ export default function EnrolledCourses () {
completed={course.progressPercentage || 0}
height="8px"
isLabelVisible={false}
- />{' '}
+ />{" "}
))}
diff --git a/frontend/src/components/core/Dashboard/InstructorCourses/CoursesTable.jsx b/frontend/src/components/core/Dashboard/InstructorCourses/CoursesTable.jsx
index 1f62ce0..caf1f29 100644
--- a/frontend/src/components/core/Dashboard/InstructorCourses/CoursesTable.jsx
+++ b/frontend/src/components/core/Dashboard/InstructorCourses/CoursesTable.jsx
@@ -1,22 +1,22 @@
-import { useSelector } from 'react-redux'
-import { Table, Thead, Tbody, Tr, Th, Td } from 'react-super-responsive-table'
-import 'react-super-responsive-table/dist/SuperResponsiveTableStyle.css'
-import { useState } from 'react'
-import { FaCheck } from 'react-icons/fa'
-import { FiEdit2 } from 'react-icons/fi'
-import { HiClock } from 'react-icons/hi'
-import { RiDeleteBin6Line } from 'react-icons/ri'
-import { useNavigate } from 'react-router-dom'
+import { useSelector } from "react-redux"
+import { Table, Thead, Tbody, Tr, Th, Td } from "react-super-responsive-table"
+import "react-super-responsive-table/dist/SuperResponsiveTableStyle.css"
+import { useState } from "react"
+import { FaCheck } from "react-icons/fa"
+import { FiEdit2 } from "react-icons/fi"
+import { HiClock } from "react-icons/hi"
+import { RiDeleteBin6Line } from "react-icons/ri"
+import { useNavigate } from "react-router-dom"
-import { formatDate } from '../../../../services/formatDate.js'
+import { formatDate } from "../../../../services/formatDate.js"
import {
deleteCourse,
fetchInstructorCourses,
-} from '../../../../services/operations/courseDetailsAPI.js'
-import { COURSE_STATUS } from '../../../../utils/constants'
-import ConfirmationModal from '../../../common/ConfirmationModal'
-import { GetCourseTotalDuration } from '../../../../utils/totalDuration.js'
-import PropTypes from 'prop-types'
+} from "../../../../services/operations/courseDetailsAPI.js"
+import { COURSE_STATUS } from "../../../../utils/constants"
+import ConfirmationModal from "../../../common/ConfirmationModal"
+import { GetCourseTotalDuration } from "../../../../utils/totalDuration.js"
+import PropTypes from "prop-types"
export default function CoursesTable ({ courses, setCourses }) {
const navigate = useNavigate()
@@ -42,20 +42,20 @@ export default function CoursesTable ({ courses, setCourses }) {
- {' '}
- Courses{' '}
+ {" "}
+ Courses{" "}
- {' '}
- Duration{' '}
+ {" "}
+ Duration{" "}
- {' '}
- Price{' '}
+ {" "}
+ Price{" "}
- {' '}
- Actions{' '}
+ {" "}
+ Actions{" "}
@@ -65,8 +65,8 @@ export default function CoursesTable ({ courses, setCourses }) {
? (
- {' '}
- No courses found{' '}
+ {" "}
+ No courses found{" "}
)
@@ -84,21 +84,21 @@ export default function CoursesTable ({ courses, setCourses }) {
/>
- {' '}
- {course.courseName}{' '}
+ {" "}
+ {course.courseName}{" "}
- {course.courseDescription.split(' ').length >
+ {course.courseDescription.split(" ").length >
TRUNCATE_LENGTH
? course.courseDescription
- .split(' ')
+ .split(" ")
.slice(0, TRUNCATE_LENGTH)
- .join(' ') + '...'
+ .join(" ") + "..."
: course.courseDescription}
- {' '}
- Created: {formatDate(course.createdAt)}{' '}
+ {" "}
+ Created: {formatDate(course.createdAt)}{" "}
{course.status === COURSE_STATUS.DRAFT
? (
@@ -117,12 +117,12 @@ export default function CoursesTable ({ courses, setCourses }) {
- {' '}
- {GetCourseTotalDuration(course)}{' '}
+ {" "}
+ {GetCourseTotalDuration(course)}{" "}
- {' '}
- ₹{course.price}{' '}
+ {" "}
+ ₹{course.price}{" "}
{
setConfirmationModal({
- text1: 'Do you want to delete this course?',
+ text1: "Do you want to delete this course?",
text2:
- 'All the data related to this course will be deleted',
- btn1Text: !loading ? 'Delete' : 'Loading... ',
- btn2Text: 'Cancel',
+ "All the data related to this course will be deleted",
+ btn1Text: !loading ? "Delete" : "Loading... ",
+ btn2Text: "Cancel",
btn1Handler: !loading
? () => handleCourseDelete(course._id)
: () => { },
diff --git a/frontend/src/components/core/Dashboard/InstructorCourses/MyCourses.jsx b/frontend/src/components/core/Dashboard/InstructorCourses/MyCourses.jsx
index 7ac2ef9..57d26d4 100644
--- a/frontend/src/components/core/Dashboard/InstructorCourses/MyCourses.jsx
+++ b/frontend/src/components/core/Dashboard/InstructorCourses/MyCourses.jsx
@@ -1,10 +1,10 @@
-import { useEffect, useState } from 'react'
-import { VscAdd } from 'react-icons/vsc'
-import { useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { fetchInstructorCourses } from '../../../../services/operations/courseDetailsAPI.js'
-import IconBtn from '../../../common/IconBtn.jsx'
-import CoursesTable from './CoursesTable.jsx'
+import { useEffect, useState } from "react"
+import { VscAdd } from "react-icons/vsc"
+import { useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { fetchInstructorCourses } from "../../../../services/operations/courseDetailsAPI.js"
+import IconBtn from "../../../common/IconBtn.jsx"
+import CoursesTable from "./CoursesTable.jsx"
export default function MyCourses () {
const { token } = useSelector((state) => state.auth)
@@ -25,7 +25,7 @@ export default function MyCourses () {
My Courses
navigate('/dashboard/add-course')}
+ onclick={() => navigate("/dashboard/add-course")}
>
diff --git a/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorChart.jsx b/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorChart.jsx
index 6973657..9c466d6 100644
--- a/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorChart.jsx
+++ b/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorChart.jsx
@@ -1,12 +1,12 @@
-import { useState } from 'react'
-import { Chart, registerables } from 'chart.js'
-import { Pie } from 'react-chartjs-2'
-import PropTypes from 'prop-types'
+import { useState } from "react"
+import { Chart, registerables } from "chart.js"
+import { Pie } from "react-chartjs-2"
+import PropTypes from "prop-types"
Chart.register(...registerables)
export default function InstructorChart ({ courses }) {
- const [currChart, setCurrChart] = useState('students') // State to keep track of the currently selected chart
+ const [currChart, setCurrChart] = useState("students") // State to keep track of the currently selected chart
const generateRandomColors = (numColors) => { // Function to generate random colors for the chart
const colors = []
@@ -53,17 +53,17 @@ export default function InstructorChart ({ courses }) {
Visualize
{/* Button to switch to the "students" chart */}
- setCurrChart('students')} className={`rounded-sm p-1 px-3 transition-all duration-200 ${currChart === 'students' ? 'bg-richblack-700 text-yellow-50' : 'text-yellow-400'}`} >
+ setCurrChart("students")} className={`rounded-sm p-1 px-3 transition-all duration-200 ${currChart === "students" ? "bg-richblack-700 text-yellow-50" : "text-yellow-400"}`} >
Students
{/* Button to switch to the "income" chart */}
- setCurrChart('income')} className={`rounded-sm p-1 px-3 transition-all duration-200 ${currChart === 'income' ? 'bg-richblack-700 text-yellow-50' : 'text-yellow-400'}`} >
+ setCurrChart("income")} className={`rounded-sm p-1 px-3 transition-all duration-200 ${currChart === "income" ? "bg-richblack-700 text-yellow-50" : "text-yellow-400"}`} >
Income
{/* Render the Pie chart based on the selected chart */}
-
+
diff --git a/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorDashboard.jsx b/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorDashboard.jsx
index 76cf748..9d6c943 100644
--- a/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorDashboard.jsx
+++ b/frontend/src/components/core/Dashboard/InstructorDashboard/InstructorDashboard.jsx
@@ -1,9 +1,9 @@
-import { useEffect, useState } from 'react'
-import { useSelector } from 'react-redux'
-import { Link } from 'react-router-dom'
-import { fetchInstructorCourses } from '../../../../services/operations/courseDetailsAPI'
-import { getInstructorData } from '../../../../services/operations/profileAPI'
-import InstructorChart from './InstructorChart'
+import { useEffect, useState } from "react"
+import { useSelector } from "react-redux"
+import { Link } from "react-router-dom"
+import { fetchInstructorCourses } from "../../../../services/operations/courseDetailsAPI"
+import { getInstructorData } from "../../../../services/operations/profileAPI"
+import InstructorChart from "./InstructorChart"
export default function Instructor () {
const { token } = useSelector((state) => state.auth)
@@ -18,7 +18,7 @@ export default function Instructor () {
const instructorApiData = await getInstructorData(token)
const result = await fetchInstructorCourses(token)
if (instructorApiData?.length) {
- console.log('inside if')
+ console.log("inside if")
setInstructorData(instructorApiData)
}
if (result) {
@@ -42,12 +42,12 @@ export default function Instructor () {
- {' '}
- Hi {user?.firstName} 👋{' '}
+ {" "}
+ Hi {user?.firstName} 👋{" "}
- {' '}
- Let&'s start something new{' '}
+ {" "}
+ Let&'s start something new{" "}
@@ -70,8 +70,8 @@ export default function Instructor () {
Visualize
- {' '}
- Not Enough Data To Visualize{' '}
+ {" "}
+ Not Enough Data To Visualize{" "}
)}
@@ -89,14 +89,14 @@ export default function Instructor () {
Total Students
- {totalStudents}{' '}
+ {totalStudents}{" "}
Total Income
- {' '}
- Rs. {totalAmount}{' '}
+ {" "}
+ Rs. {totalAmount}{" "}
@@ -122,19 +122,19 @@ export default function Instructor () {
/>
- {' '}
- {course?.courseName}{' '}
+ {" "}
+ {course?.courseName}{" "}
- {course?.studentsEnroled?.length ?? 0} students{' '}
+ {course?.studentsEnroled?.length ?? 0} students{" "}
- {' '}
- |{' '}
+ {" "}
+ |{" "}
- {' '}
+ {" "}
Rs. {course?.price}
@@ -148,13 +148,13 @@ export default function Instructor () {
: (
- {' '}
+ {" "}
You have not created any courses yet
- {' '}
- Create a course{' '}
+ {" "}
+ Create a course{" "}
diff --git a/frontend/src/components/core/Dashboard/MyProfile.jsx b/frontend/src/components/core/Dashboard/MyProfile.jsx
index b7cebf3..4db4f0c 100644
--- a/frontend/src/components/core/Dashboard/MyProfile.jsx
+++ b/frontend/src/components/core/Dashboard/MyProfile.jsx
@@ -1,8 +1,8 @@
-import { RiEditBoxLine } from 'react-icons/ri'
-import { useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { formattedDate } from '../../../utils/dateFormatter'
-import IconBtn from '../../common/IconBtn'
+import { RiEditBoxLine } from "react-icons/ri"
+import { useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { formattedDate } from "../../../utils/dateFormatter"
+import IconBtn from "../../common/IconBtn"
export default function MyProfile () {
const { user } = useSelector((state) => state.profile)
@@ -19,11 +19,11 @@ export default function MyProfile () {
-
{user?.firstName + ' ' + user?.lastName}
+
{user?.firstName + " " + user?.lastName}
{user?.email}
- { navigate('/dashboard/settings') }} >
+ { navigate("/dashboard/settings") }} >
@@ -33,12 +33,12 @@ export default function MyProfile () {
About
-
{ navigate('/dashboard/settings') }}>
+ { navigate("/dashboard/settings") }}>
-
- {user?.additionalDetails?.about ?? 'Write Something About Yourself'}
+
+ {user?.additionalDetails?.about ?? "Write Something About Yourself"}
@@ -47,7 +47,7 @@ export default function MyProfile () {
Personal Details
-
{ navigate('/dashboard/settings') }} >
+ { navigate("/dashboard/settings") }} >
@@ -65,7 +65,7 @@ export default function MyProfile () {
Gender
-
{user?.additionalDetails?.gender ?? 'Add Gender'}
+
{user?.additionalDetails?.gender ?? "Add Gender"}
@@ -76,12 +76,12 @@ export default function MyProfile () {
Phone Number
-
{user?.additionalDetails?.contactNumber ?? 'Add Contact Number'}
+
{user?.additionalDetails?.contactNumber ?? "Add Contact Number"}
Date Of Birth
- {formattedDate(user?.additionalDetails?.dateOfBirth) ?? 'Add Date Of Birth'}
+ {formattedDate(user?.additionalDetails?.dateOfBirth) ?? "Add Date Of Birth"}
diff --git a/frontend/src/components/core/Dashboard/Settings/ChangeProfilePicture.jsx b/frontend/src/components/core/Dashboard/Settings/ChangeProfilePicture.jsx
index 2fc1fac..b9af119 100644
--- a/frontend/src/components/core/Dashboard/Settings/ChangeProfilePicture.jsx
+++ b/frontend/src/components/core/Dashboard/Settings/ChangeProfilePicture.jsx
@@ -1,8 +1,8 @@
-import { useEffect, useRef, useState } from 'react'
-import { FiUpload } from 'react-icons/fi'
-import { useDispatch, useSelector } from 'react-redux'
-import { updateDisplayPicture } from '../../../../services/operations/SettingsAPI'
-import IconBtn from '../../../common/IconBtn'
+import { useEffect, useRef, useState } from "react"
+import { FiUpload } from "react-icons/fi"
+import { useDispatch, useSelector } from "react-redux"
+import { updateDisplayPicture } from "../../../../services/operations/SettingsAPI"
+import IconBtn from "../../../common/IconBtn"
export default function ChangeProfilePicture () {
const { token } = useSelector((state) => state.auth)
@@ -37,15 +37,15 @@ export default function ChangeProfilePicture () {
const handleFileUpload = () => {
try {
- console.log('uploading...')
+ console.log("uploading...")
setLoading(true)
const formData = new FormData()
- formData.append('displayPicture', imageFile)
+ formData.append("displayPicture", imageFile)
dispatch(updateDisplayPicture(token, formData)).then(() => {
setLoading(false)
})
} catch (error) {
- console.log('ERROR MESSAGE - ', error.message)
+ console.log("ERROR MESSAGE - ", error.message)
}
}
@@ -83,7 +83,7 @@ export default function ChangeProfilePicture () {
Select
{!loading && (
diff --git a/frontend/src/components/core/Dashboard/Settings/DeleteAccount.jsx b/frontend/src/components/core/Dashboard/Settings/DeleteAccount.jsx
index bd54279..fc45282 100644
--- a/frontend/src/components/core/Dashboard/Settings/DeleteAccount.jsx
+++ b/frontend/src/components/core/Dashboard/Settings/DeleteAccount.jsx
@@ -1,7 +1,7 @@
-import { FiTrash2 } from 'react-icons/fi'
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { deleteUserAccount } from '../../../../services/operations/SettingsAPI'
+import { FiTrash2 } from "react-icons/fi"
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { deleteUserAccount } from "../../../../services/operations/SettingsAPI"
export default function DeleteAccount () {
const { token } = useSelector((state) => state.auth)
@@ -12,7 +12,7 @@ export default function DeleteAccount () {
try {
dispatch(deleteUserAccount(token, navigate))
} catch (error) {
- console.log('ERROR MESSAGE - ', error.message)
+ console.log("ERROR MESSAGE - ", error.message)
}
}
diff --git a/frontend/src/components/core/Dashboard/Settings/EditProfile.jsx b/frontend/src/components/core/Dashboard/Settings/EditProfile.jsx
index 952f917..36fe452 100644
--- a/frontend/src/components/core/Dashboard/Settings/EditProfile.jsx
+++ b/frontend/src/components/core/Dashboard/Settings/EditProfile.jsx
@@ -1,10 +1,10 @@
-import { useForm } from 'react-hook-form'
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { updateProfile } from '../../../../services/operations/SettingsAPI'
-import IconBtn from '../../../common/IconBtn'
+import { useForm } from "react-hook-form"
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { updateProfile } from "../../../../services/operations/SettingsAPI"
+import IconBtn from "../../../common/IconBtn"
-const genders = ['Male', 'Female', 'Non-Binary', 'Prefer not to say', 'Other']
+const genders = ["Male", "Female", "Non-Binary", "Prefer not to say", "Other"]
export default function EditProfile () {
const { user } = useSelector((state) => state.profile)
@@ -22,7 +22,7 @@ export default function EditProfile () {
try {
dispatch(updateProfile(token, data))
} catch (error) {
- console.log('ERROR MESSAGE - ', error.message)
+ console.log("ERROR MESSAGE - ", error.message)
}
}
@@ -46,7 +46,7 @@ export default function EditProfile () {
id="firstName"
placeholder="Enter first name"
className="form-style"
- {...register('firstName', { required: true })}
+ {...register("firstName", { required: true })}
defaultValue={user?.firstName}
/>
{errors.firstName && (
@@ -65,7 +65,7 @@ export default function EditProfile () {
id="lastName"
placeholder="Enter first name"
className="form-style"
- {...register('lastName', { required: true })}
+ {...register("lastName", { required: true })}
defaultValue={user?.lastName}
/>
{errors.lastName && (
@@ -86,14 +86,14 @@ export default function EditProfile () {
name="dateOfBirth"
id="dateOfBirth"
className="form-style"
- {...register('dateOfBirth', {
+ {...register("dateOfBirth", {
required: {
value: true,
- message: 'Please enter your Date of Birth.',
+ message: "Please enter your Date of Birth.",
},
max: {
- value: new Date().toISOString().split('T')[0],
- message: 'Date of Birth cannot be in the future.',
+ value: new Date().toISOString().split("T")[0],
+ message: "Date of Birth cannot be in the future.",
},
})}
defaultValue={user?.additionalDetails?.dateOfBirth}
@@ -113,7 +113,7 @@ export default function EditProfile () {
name="gender"
id="gender"
className="form-style"
- {...register('gender', { required: true })}
+ {...register("gender", { required: true })}
defaultValue={user?.additionalDetails?.gender}
>
{genders.map((ele, i) => {
@@ -143,13 +143,13 @@ export default function EditProfile () {
id="contactNumber"
placeholder="Enter Contact Number"
className="form-style"
- {...register('contactNumber', {
+ {...register("contactNumber", {
required: {
value: true,
- message: 'Please enter your Contact Number.',
+ message: "Please enter your Contact Number.",
},
- maxLength: { value: 12, message: 'Invalid Contact Number' },
- minLength: { value: 10, message: 'Invalid Contact Number' },
+ maxLength: { value: 12, message: "Invalid Contact Number" },
+ minLength: { value: 10, message: "Invalid Contact Number" },
})}
defaultValue={user?.additionalDetails?.contactNumber}
/>
@@ -169,7 +169,7 @@ export default function EditProfile () {
id="about"
placeholder="Enter Bio Details"
className="form-style"
- {...register('about', { required: true })}
+ {...register("about", { required: true })}
defaultValue={user?.additionalDetails?.about}
/>
{errors.about && (
@@ -184,7 +184,7 @@ export default function EditProfile () {
{
- navigate('/dashboard/my-profile')
+ navigate("/dashboard/my-profile")
}}
className="cursor-pointer rounded-md bg-richblack-700 py-2 px-5 font-semibold text-richblack-50"
>
diff --git a/frontend/src/components/core/Dashboard/Settings/Settings.jsx b/frontend/src/components/core/Dashboard/Settings/Settings.jsx
index 5e494d9..f0b0d51 100644
--- a/frontend/src/components/core/Dashboard/Settings/Settings.jsx
+++ b/frontend/src/components/core/Dashboard/Settings/Settings.jsx
@@ -1,14 +1,14 @@
-import ChangeProfilePicture from './ChangeProfilePicture'
-import DeleteAccount from './DeleteAccount'
-import EditProfile from './EditProfile'
-import UpdatePassword from './UpdatePassword'
+import ChangeProfilePicture from "./ChangeProfilePicture"
+import DeleteAccount from "./DeleteAccount"
+import EditProfile from "./EditProfile"
+import UpdatePassword from "./UpdatePassword"
export default function Settings () {
return (
<>
- {' '}
- Edit Profile{' '}
+ {" "}
+ Edit Profile{" "}
diff --git a/frontend/src/components/core/Dashboard/Settings/UpdatePassword.jsx b/frontend/src/components/core/Dashboard/Settings/UpdatePassword.jsx
index 06d733f..c387677 100644
--- a/frontend/src/components/core/Dashboard/Settings/UpdatePassword.jsx
+++ b/frontend/src/components/core/Dashboard/Settings/UpdatePassword.jsx
@@ -1,10 +1,10 @@
-import { useState } from 'react'
-import { useForm } from 'react-hook-form'
-import { AiOutlineEye, AiOutlineEyeInvisible } from 'react-icons/ai'
-import { useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { changePassword } from '../../../../services/operations/SettingsAPI'
-import IconBtn from '../../../common/IconBtn'
+import { useState } from "react"
+import { useForm } from "react-hook-form"
+import { AiOutlineEye, AiOutlineEyeInvisible } from "react-icons/ai"
+import { useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { changePassword } from "../../../../services/operations/SettingsAPI"
+import IconBtn from "../../../common/IconBtn"
export default function UpdatePassword () {
const { token } = useSelector((state) => state.auth)
@@ -22,7 +22,7 @@ export default function UpdatePassword () {
try {
await changePassword(token, data)
} catch (error) {
- console.log('ERROR MESSAGE - ', error.message)
+ console.log("ERROR MESSAGE - ", error.message)
}
}
@@ -34,16 +34,16 @@ export default function UpdatePassword () {
- {' '}
- Current Password{' '}
+ {" "}
+ Current Password{" "}
setShowOldPassword((prev) => !prev)}
@@ -59,7 +59,7 @@ export default function UpdatePassword () {
{errors.oldPassword && (
- {' '}
+ {" "}
Please enter your Current Password.
)}
@@ -67,16 +67,16 @@ export default function UpdatePassword () {
- {' '}
- New Password{' '}
+ {" "}
+ New Password{" "}
setShowNewPassword((prev) => !prev)}
@@ -92,7 +92,7 @@ export default function UpdatePassword () {
{errors.newPassword && (
- {' '}
+ {" "}
Please enter your New Password.
)}
@@ -104,7 +104,7 @@ export default function UpdatePassword () {
{
- navigate('/dashboard/my-profile')
+ navigate("/dashboard/my-profile")
}}
>
Cancel
diff --git a/frontend/src/components/core/Dashboard/Sidebar.jsx b/frontend/src/components/core/Dashboard/Sidebar.jsx
index 1852e75..278b158 100644
--- a/frontend/src/components/core/Dashboard/Sidebar.jsx
+++ b/frontend/src/components/core/Dashboard/Sidebar.jsx
@@ -1,11 +1,11 @@
-import { useState } from 'react'
-import { VscSignOut } from 'react-icons/vsc'
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate } from 'react-router-dom'
-import { sidebarLinks } from '../../../data/dashboard-links'
-import { logout } from '../../../services/operations/authAPI'
-import ConfirmationModal from '../../common/ConfirmationModal.jsx'
-import SidebarLink from './SidebarLink.jsx'
+import { useState } from "react"
+import { VscSignOut } from "react-icons/vsc"
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate } from "react-router-dom"
+import { sidebarLinks } from "../../../data/dashboard-links"
+import { logout } from "../../../services/operations/authAPI"
+import ConfirmationModal from "../../common/ConfirmationModal.jsx"
+import SidebarLink from "./SidebarLink.jsx"
export default function Sidebar () {
const { user, loading: profileLoading } = useSelector(
@@ -39,7 +39,7 @@ export default function Sidebar () {
@@ -47,10 +47,10 @@ export default function Sidebar () {
className="px-8 py-2 text-sm font-medium text-richblack-300"
onClick={() =>
setConfirmationModal({
- text1: 'Are you sure?',
- text2: 'You will be logged out of your account.',
- btn1Text: 'Logout',
- btn2Text: 'Cancel',
+ text1: "Are you sure?",
+ text2: "You will be logged out of your account.",
+ btn1Text: "Logout",
+ btn2Text: "Cancel",
btn1Handler: () => dispatch(logout(navigate)),
btn2Handler: () => setConfirmationModal(null),
})
diff --git a/frontend/src/components/core/Dashboard/SidebarLink.jsx b/frontend/src/components/core/Dashboard/SidebarLink.jsx
index 55a4cae..6512136 100644
--- a/frontend/src/components/core/Dashboard/SidebarLink.jsx
+++ b/frontend/src/components/core/Dashboard/SidebarLink.jsx
@@ -1,8 +1,8 @@
-import * as Icons from 'react-icons/vsc'
-import { useDispatch } from 'react-redux'
-import { NavLink, matchPath, useLocation } from 'react-router-dom'
-import { resetCourseState } from '../../../slices/courseSlice'
-import PropTypes from 'prop-types'
+import * as Icons from "react-icons/vsc"
+import { useDispatch } from "react-redux"
+import { NavLink, matchPath, useLocation } from "react-router-dom"
+import { resetCourseState } from "../../../slices/courseSlice"
+import PropTypes from "prop-types"
export default function SidebarLink ({ link, iconName }) {
const Icon = Icons[iconName]
@@ -18,12 +18,12 @@ export default function SidebarLink ({ link, iconName }) {
to={link.path}
onClick={() => dispatch(resetCourseState())}
className={`relative px-8 py-2 text-sm font-medium ${matchRoute(link.path)
- ? 'bg-yellow-800 text-yellow-50'
- : 'bg-opacity-0 text-richblack-300'
+ ? "bg-yellow-800 text-yellow-50"
+ : "bg-opacity-0 text-richblack-300"
} transition-all duration-200`}
>
diff --git a/frontend/src/components/core/HomePage/Button.jsx b/frontend/src/components/core/HomePage/Button.jsx
index 5f581d1..a89079a 100644
--- a/frontend/src/components/core/HomePage/Button.jsx
+++ b/frontend/src/components/core/HomePage/Button.jsx
@@ -1,11 +1,11 @@
-import { Link } from 'react-router-dom'
-import PropTypes from 'prop-types'
+import { Link } from "react-router-dom"
+import PropTypes from "prop-types"
const Button = ({ children, active, linkto }) => {
return (
{children}
diff --git a/frontend/src/components/core/HomePage/CodeBlocks.jsx b/frontend/src/components/core/HomePage/CodeBlocks.jsx
index 88a9e19..3416d9f 100644
--- a/frontend/src/components/core/HomePage/CodeBlocks.jsx
+++ b/frontend/src/components/core/HomePage/CodeBlocks.jsx
@@ -1,7 +1,7 @@
-import CTAButton from '../HomePage/Button'
-import { FaArrowRight } from 'react-icons/fa'
-import { TypeAnimation } from 'react-type-animation'
-import PropTypes from 'prop-types'
+import CTAButton from "../HomePage/Button"
+import { FaArrowRight } from "react-icons/fa"
+import { TypeAnimation } from "react-type-animation"
+import PropTypes from "prop-types"
const CodeBlocks = ({
position,
@@ -27,14 +27,14 @@ const CodeBlocks = ({
- {' '}
- {ctabtn1.btnText} {' '}
+ {" "}
+ {ctabtn1.btnText} {" "}
- {' '}
- {ctabtn2.btnText}{' '}
+ {" "}
+ {ctabtn2.btnText}{" "}
@@ -59,14 +59,14 @@ const CodeBlocks = ({
className={`w-[90%] flex flex-col gap-2 font-bold font-mono ${codeColor} pr-1`}
>
- {' '}
+
{" "}
)
}
diff --git a/frontend/src/components/core/HomePage/CourseCard.jsx b/frontend/src/components/core/HomePage/CourseCard.jsx
index a49572e..ed88312 100644
--- a/frontend/src/components/core/HomePage/CourseCard.jsx
+++ b/frontend/src/components/core/HomePage/CourseCard.jsx
@@ -1,6 +1,6 @@
-import { HiUsers } from 'react-icons/hi'
-import { ImTree } from 'react-icons/im'
-import PropTypes from 'prop-types'
+import { HiUsers } from "react-icons/hi"
+import { ImTree } from "react-icons/im"
+import PropTypes from "prop-types"
const CourseCard = ({ cardData, currentCard, setCurrentCard }) => {
return (
@@ -8,19 +8,19 @@ const CourseCard = ({ cardData, currentCard, setCurrentCard }) => {
className={`w-[360px] lg:w-[30%] text-richblack-25 h-[300px] box-border cursor-pointer
${
currentCard === cardData.heading
- ? 'bg-white shadow-[12px_12px_0_0] shadow-yellow-50'
- : 'bg-richblack-800'
+ ? "bg-white shadow-[12px_12px_0_0] shadow-yellow-50"
+ : "bg-richblack-800"
} `}
onClick={() => setCurrentCard(cardData.heading)}
>
- {' '}
- {cardData?.heading}{' '}
+ {" "}
+ {cardData?.heading}{" "}
{cardData.description}
@@ -28,19 +28,19 @@ const CourseCard = ({ cardData, currentCard, setCurrentCard }) => {
- {' '}
- {cardData.level}{' '}
-
{' '}
+ {" "}
+
{cardData.level}{" "}
+ {" "}
{/* Level :- Beginner */}
- {' '}
- {cardData.lessonNumber} Lesson{' '}
-
{' '}
+ {" "}
+
{cardData.lessonNumber} Lesson{" "}
+ {" "}
{/* Flow Chart :- 6 Lession */}
diff --git a/frontend/src/components/core/HomePage/ExploreMore.jsx b/frontend/src/components/core/HomePage/ExploreMore.jsx
index 2a6b0f0..caf7fb6 100644
--- a/frontend/src/components/core/HomePage/ExploreMore.jsx
+++ b/frontend/src/components/core/HomePage/ExploreMore.jsx
@@ -1,14 +1,14 @@
-import { useState } from 'react'
-import { HomePageExplore } from '../../../data/homepage-explore'
-import CourseCard from './CourseCard'
-import HighlightText from './HighlightText'
+import { useState } from "react"
+import { HomePageExplore } from "../../../data/homepage-explore"
+import CourseCard from "./CourseCard"
+import HighlightText from "./HighlightText"
const tabsName = [
- 'Free',
- 'New to coding',
- 'Most popular',
- 'Skills paths',
- 'Career paths',
+ "Free",
+ "New to coding",
+ "Most popular",
+ "Skills paths",
+ "Career paths",
]
const ExploreMore = () => {
@@ -29,10 +29,10 @@ const ExploreMore = () => {
Unlock the
-
+
- {' '}
- Learn to build anything you can imagine{' '}
+ {" "}
+ Learn to build anything you can imagine{" "}
@@ -43,8 +43,8 @@ const ExploreMore = () => {
setMyCards(element)}
diff --git a/frontend/src/components/core/HomePage/HighlightText.jsx b/frontend/src/components/core/HomePage/HighlightText.jsx
index 1851eed..8f9af06 100644
--- a/frontend/src/components/core/HomePage/HighlightText.jsx
+++ b/frontend/src/components/core/HomePage/HighlightText.jsx
@@ -1,9 +1,9 @@
-import PropTypes from 'prop-types'
+import PropTypes from "prop-types"
const HighlightText = ({ text }) => {
return (
- {' '}
+ {" "}
{text}
)
diff --git a/frontend/src/components/core/HomePage/InstructorSection.jsx b/frontend/src/components/core/HomePage/InstructorSection.jsx
index f7a2098..8d278df 100644
--- a/frontend/src/components/core/HomePage/InstructorSection.jsx
+++ b/frontend/src/components/core/HomePage/InstructorSection.jsx
@@ -1,7 +1,7 @@
-import Instructor from '../../../assets/Images/Instructor.png'
-import HighlightText from './HighlightText'
-import CTAButton from '../HomePage/Button'
-import { FaArrowRight } from 'react-icons/fa'
+import Instructor from "../../../assets/Images/Instructor.png"
+import HighlightText from "./HighlightText"
+import CTAButton from "../HomePage/Button"
+import { FaArrowRight } from "react-icons/fa"
const InstructorSection = () => {
return (
@@ -18,11 +18,11 @@ const InstructorSection = () => {
Become an
-
+
Instructors from around the world teach millions of students on StudyNotion. We provide the tools and skills to teach what you love.
diff --git a/frontend/src/components/core/HomePage/LearningLanguageSection.jsx b/frontend/src/components/core/HomePage/LearningLanguageSection.jsx
index f6cde21..2ad1a88 100644
--- a/frontend/src/components/core/HomePage/LearningLanguageSection.jsx
+++ b/frontend/src/components/core/HomePage/LearningLanguageSection.jsx
@@ -1,8 +1,8 @@
-import HighlightText from './HighlightText'
-import KnowYourProgress from '../../../assets/Images/Know_your_progress.png'
-import CompareWithOthers from '../../../assets/Images/Compare_with_others.png'
-import PlanYourLesson from '../../../assets/Images/Plan_your_lessons.png'
-import CTAButton from '../HomePage/Button'
+import HighlightText from "./HighlightText"
+import KnowYourProgress from "../../../assets/Images/Know_your_progress.png"
+import CompareWithOthers from "../../../assets/Images/Compare_with_others.png"
+import PlanYourLesson from "../../../assets/Images/Plan_your_lessons.png"
+import CTAButton from "../HomePage/Button"
const LearningLanguageSection = () => {
return (
@@ -12,7 +12,7 @@ const LearningLanguageSection = () => {
Your Swiss Knife for
-
+
Using spin making learning multiple languages easy. with 20+ languages realistic voice-over, progress tracking, custom schedule and more.
@@ -25,7 +25,7 @@ const LearningLanguageSection = () => {
- Learn more
+ Learn more
>
diff --git a/frontend/src/components/core/HomePage/TimelineSection.jsx b/frontend/src/components/core/HomePage/TimelineSection.jsx
index df841dd..5e83296 100644
--- a/frontend/src/components/core/HomePage/TimelineSection.jsx
+++ b/frontend/src/components/core/HomePage/TimelineSection.jsx
@@ -1,33 +1,33 @@
-import Logo1 from '../../../assets/TimeLineLogo/Logo1.svg'
-import Logo2 from '../../../assets/TimeLineLogo/Logo2.svg'
-import Logo3 from '../../../assets/TimeLineLogo/Logo3.svg'
-import Logo4 from '../../../assets/TimeLineLogo/Logo4.svg'
-import timelineImage from '../../../assets/Images/TimelineImage.png'
+import Logo1 from "../../../assets/TimeLineLogo/Logo1.svg"
+import Logo2 from "../../../assets/TimeLineLogo/Logo2.svg"
+import Logo3 from "../../../assets/TimeLineLogo/Logo3.svg"
+import Logo4 from "../../../assets/TimeLineLogo/Logo4.svg"
+import timelineImage from "../../../assets/Images/TimelineImage.png"
const timeline = [
{
Logo: Logo1,
- heading: 'Leadership',
- Description: 'Fully committed to the success of the company',
- date: 'January 2010 - December 2012',
+ heading: "Leadership",
+ Description: "Fully committed to the success of the company",
+ date: "January 2010 - December 2012",
},
{
Logo: Logo2,
- heading: 'Product Launch',
- Description: 'Launched new product line and increased revenue by 50%',
- date: 'March 2013 - February 2014',
+ heading: "Product Launch",
+ Description: "Launched new product line and increased revenue by 50%",
+ date: "March 2013 - February 2014",
},
{
Logo: Logo3,
- heading: 'Expansion',
- Description: 'Expanded new fields and increased customer base by 75%',
- date: 'June 2014 - May 2016',
+ heading: "Expansion",
+ Description: "Expanded new fields and increased customer base by 75%",
+ date: "June 2014 - May 2016",
},
{
Logo: Logo4,
- heading: 'Acquisition',
- Description: 'Acquired competitor and became market leader in the industry',
- date: 'September 2016 - Present',
+ heading: "Acquisition",
+ Description: "Acquired competitor and became market leader in the industry",
+ date: "September 2016 - Present",
},
]
@@ -56,10 +56,10 @@ const TimelineSection = () => {
- {' '}
+ {" "}
)
@@ -77,16 +77,16 @@ const TimelineSection = () => {
10
- {' '}
- Years of Experience{' '}
+ {" "}
+ Years of Experience{" "}
250
- {' '}
- Type of Courses{' '}
+ {" "}
+ Type of Courses{" "}
diff --git a/frontend/src/components/core/ViewCourse/CourseReviewModal.jsx b/frontend/src/components/core/ViewCourse/CourseReviewModal.jsx
index 864160f..0150d58 100644
--- a/frontend/src/components/core/ViewCourse/CourseReviewModal.jsx
+++ b/frontend/src/components/core/ViewCourse/CourseReviewModal.jsx
@@ -1,11 +1,11 @@
-import { useEffect } from 'react'
-import { useForm } from 'react-hook-form'
-import { RxCross2 } from 'react-icons/rx'
-import ReactStars from 'react-rating-stars-component'
-import { useSelector } from 'react-redux'
-import { createRating } from '../../../services/operations/courseDetailsAPI'
-import IconBtn from '../../common/IconBtn'
-import PropTypes from 'prop-types'
+import { useEffect } from "react"
+import { useForm } from "react-hook-form"
+import { RxCross2 } from "react-icons/rx"
+import ReactStars from "react-rating-stars-component"
+import { useSelector } from "react-redux"
+import { createRating } from "../../../services/operations/courseDetailsAPI"
+import IconBtn from "../../common/IconBtn"
+import PropTypes from "prop-types"
export default function CourseReviewModal ({ setReviewModal }) {
const { user } = useSelector((state) => state.profile)
@@ -15,12 +15,12 @@ export default function CourseReviewModal ({ setReviewModal }) {
const { register, handleSubmit, setValue, formState: { errors } } = useForm()
useEffect(() => {
- setValue('courseExperience', '')
- setValue('courseRating', 0)
+ setValue("courseExperience", "")
+ setValue("courseRating", 0)
}, [])
const ratingChanged = (newRating) => {
- setValue('courseRating', newRating)
+ setValue("courseRating", newRating)
}
const onSubmit = async (data) => {
@@ -50,7 +50,7 @@ export default function CourseReviewModal ({ setReviewModal }) {
-
+
{user?.firstName} {user?.lastName}
Posting Publicly
@@ -66,7 +66,7 @@ export default function CourseReviewModal ({ setReviewModal }) {
Add Your Experience
*
-
+
{errors.courseExperience && (
Please Add Your Experience
@@ -74,7 +74,7 @@ export default function CourseReviewModal ({ setReviewModal }) {
-
setReviewModal(false)} className={'flex cursor-pointer items-center gap-x-2 rounded-md bg-richblack-300 py-[8px] px-[20px] font-semibold text-richblack-900'} >
+ setReviewModal(false)} className={"flex cursor-pointer items-center gap-x-2 rounded-md bg-richblack-300 py-[8px] px-[20px] font-semibold text-richblack-900"} >
Cancel
diff --git a/frontend/src/components/core/ViewCourse/VideoDetails.jsx b/frontend/src/components/core/ViewCourse/VideoDetails.jsx
index 35978ea..6d1c1b5 100644
--- a/frontend/src/components/core/ViewCourse/VideoDetails.jsx
+++ b/frontend/src/components/core/ViewCourse/VideoDetails.jsx
@@ -1,12 +1,12 @@
-import React, { useEffect, useRef, useState } from 'react'
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate, useParams, useLocation } from 'react-router-dom'
-import 'video-react/dist/video-react.css'
+import React, { useEffect, useRef, useState } from "react"
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate, useParams, useLocation } from "react-router-dom"
+import "video-react/dist/video-react.css"
-import { BigPlayButton, Player } from 'video-react'
-import { markLectureAsComplete } from '../../../services/operations/courseDetailsAPI'
-import { updateCompletedLectures } from '../../../slices/viewCourseSlice'
-import IconBtn from '../../common/IconBtn'
+import { BigPlayButton, Player } from "video-react"
+import { markLectureAsComplete } from "../../../services/operations/courseDetailsAPI"
+import { updateCompletedLectures } from "../../../slices/viewCourseSlice"
+import IconBtn from "../../common/IconBtn"
const VideoDetails = () => {
const { courseId, sectionId, subSectionId } = useParams()
@@ -18,15 +18,15 @@ const VideoDetails = () => {
const { courseSectionData, courseEntireData, completedLectures } = useSelector((state) => state.viewCourse)
const [videoData, setVideoData] = useState([])
- const [previewSource, setPreviewSource] = useState('')
+ const [previewSource, setPreviewSource] = useState("")
const [videoEnded, setVideoEnded] = useState(false)
const [loading, setLoading] = useState(false)
useEffect(() => {
- ; (async () => {
+ (async () => {
if (!courseSectionData.length) return
if (!courseId && !sectionId && !subSectionId) {
- navigate('/dashboard/enrolled-courses')
+ navigate("/dashboard/enrolled-courses")
} else {
const filteredData = courseSectionData.filter((course) => course._id === sectionId)
const filteredVideoData = filteredData?.[0]?.subSections.filter((data) => data._id === subSectionId)
@@ -111,11 +111,11 @@ const VideoDetails = () => {
{/* Render When Video Ends */}
{videoEnded && (
-
{!completedLectures.includes(subSectionId) && (
-
handleLectureCompletion()} text={!loading ? 'Mark As Completed' : 'Loading...'} customClasses="text-xl max-w-max px-4 mx-auto" />
+ handleLectureCompletion()} text={!loading ? "Mark As Completed" : "Loading..."} customClasses="text-xl max-w-max px-4 mx-auto" />
)}
{
- navigate('/dashboard/enrolled-courses')
+ navigate("/dashboard/enrolled-courses")
}}
title="back"
className="flex h-[35px] w-[35px] items-center justify-center rounded-full bg-richblack-100 p-1 text-richblack-700 hover:scale-90"
@@ -68,7 +68,7 @@ export default function VideoDetailsSidebar ({ setReviewModal }) {
{courseEntireData?.courseName}
- {' '}
+ {" "}
{completedLectures?.length} / {totalNoOfLectures}
@@ -89,8 +89,8 @@ export default function VideoDetailsSidebar ({ setReviewModal }) {
@@ -104,8 +104,8 @@ export default function VideoDetailsSidebar ({ setReviewModal }) {
{course.subSections.map((topic, i) => (
{
diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx
index 096b611..86cd42a 100644
--- a/frontend/src/main.jsx
+++ b/frontend/src/main.jsx
@@ -1,18 +1,18 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App.jsx'
-import './index.css'
-import { BrowserRouter } from 'react-router-dom'
-import { Provider } from 'react-redux'
-import rootReducer from './reducer/index.js'
-import { configureStore } from '@reduxjs/toolkit'
-import { Toaster } from 'react-hot-toast'
+import React from "react"
+import ReactDOM from "react-dom/client"
+import App from "./App.jsx"
+import "./index.css"
+import { BrowserRouter } from "react-router-dom"
+import { Provider } from "react-redux"
+import rootReducer from "./reducer/index.js"
+import { configureStore } from "@reduxjs/toolkit"
+import { Toaster } from "react-hot-toast"
const store = configureStore({
reducer: rootReducer,
})
-ReactDOM.createRoot(document.getElementById('root')).render(
+ReactDOM.createRoot(document.getElementById("root")).render(
diff --git a/frontend/src/pages/About.jsx b/frontend/src/pages/About.jsx
index 8e1158c..aa5d4c8 100644
--- a/frontend/src/pages/About.jsx
+++ b/frontend/src/pages/About.jsx
@@ -1,14 +1,14 @@
-import FoundingStory from '../assets/Images/FoundingStory.png'
-import BannerImage1 from '../assets/Images/aboutus1.webp'
-import BannerImage2 from '../assets/Images/aboutus2.webp'
-import BannerImage3 from '../assets/Images/aboutus3.webp'
-import ContactFormSection from '../components/core/AboutPage/ContactFormSection.jsx'
-import LearningGrid from '../components/core/AboutPage/LearningGrid'
-import Quote from '../components/core/AboutPage/Quote'
-import StatsComponenet from '../components/core/AboutPage/Stats'
-import HighlightText from '../components/core/HomePage/HighlightText'
-import ReviewSlider from '../components/common/ReviewSlider'
-import Footer from '../components/common/Footer'
+import FoundingStory from "../assets/Images/FoundingStory.png"
+import BannerImage1 from "../assets/Images/aboutus1.webp"
+import BannerImage2 from "../assets/Images/aboutus2.webp"
+import BannerImage3 from "../assets/Images/aboutus3.webp"
+import ContactFormSection from "../components/core/AboutPage/ContactFormSection.jsx"
+import LearningGrid from "../components/core/AboutPage/LearningGrid"
+import Quote from "../components/core/AboutPage/Quote"
+import StatsComponenet from "../components/core/AboutPage/Stats"
+import HighlightText from "../components/core/HomePage/HighlightText"
+import ReviewSlider from "../components/common/ReviewSlider"
+import Footer from "../components/common/Footer"
const About = () => {
return (
@@ -16,18 +16,18 @@ const About = () => {
- {' '}
- Driving Innovation in Online Education for a{' '}
-
+ {" "}
+ Driving Innovation in Online Education for a{" "}
+
- {' '}
+ {" "}
Studynotion is at the forefront of driving innovation in online
education. We are passionate about creating a brighter future by
offering cutting-edge courses, leveraging emerging technologies,
- and nurturing a vibrant learning community.{' '}
+ and nurturing a vibrant learning community.{" "}
-
{' '}
+
{" "}
{/* define gap between heading and image */}
@@ -38,7 +38,7 @@ const About = () => {
-
{' '}
+
{" "}
{/* this div used to give the height b/w section_1 and section_2 */}
@@ -46,30 +46,30 @@ const About = () => {
- {' '}
+ {" "}
{/* Our Founding Story paragraph and image */}
- {' '}
- Our{' '}
+ {" "}
+ Our{" "}
- {' '}
+ {" "}
Our e-learning platform was born out of a shared vision and
passion for transforming education. It all began with a group of
educators, technologists, and lifelong learners who recognized
the need for accessible, flexible, and high-quality learning
- opportunities in a rapidly evolving digital world.{' '}
+ opportunities in a rapidly evolving digital world.{" "}
- {' '}
+ {" "}
As experienced educators ourselves, we witnessed firsthand the
limitations and challenges of traditional education systems. We
believed that education should not be confined to the walls of a
classroom or restricted by geographical boundaries. We
envisioned a platform that could bridge these gaps and empower
individuals from all walks of life to unlock their full
- potential.{' '}
+ potential.{" "}
@@ -82,15 +82,15 @@ const About = () => {
- {' '}
+ {" "}
{/* Our vision and mission */}
- {' '}
- Our Vision{' '}
+ {" "}
+ Our Vision{" "}
- {' '}
+ {" "}
With this vision in mind, we set out on a journey to create an
e-learning platform that would revolutionize the way people
learn. Our team of dedicated experts worked tirelessly to
@@ -101,17 +101,17 @@ const About = () => {
- {' '}
- Our Mission{' '}
+ {" "}
+ Our Mission{" "}
- {' '}
+ {" "}
Our mission goes beyond just delivering courses online. We
wanted to create a vibrant community of learners, where
individuals can connect, collaborate, and learn from one
another. We believe that knowledge thrives in an environment of
sharing and dialogue, and we foster this spirit of collaboration
- through forums, live sessions, and networking opportunities.{' '}
+ through forums, live sessions, and networking opportunities.{" "}
@@ -124,8 +124,8 @@ const About = () => {
- {' '}
- Reviews from other learners{' '}
+ {" "}
+ Reviews from other learners{" "}
diff --git a/frontend/src/pages/Catalog.jsx b/frontend/src/pages/Catalog.jsx
index eb31fd1..e74320f 100644
--- a/frontend/src/pages/Catalog.jsx
+++ b/frontend/src/pages/Catalog.jsx
@@ -1,27 +1,27 @@
-import { useEffect, useState } from 'react'
-import Footer from '../components/common/Footer'
-import { useParams } from 'react-router-dom'
-import { apiConnector } from '../services/apiconnector'
-import { categories } from '../services/apis'
-import { getCatalogaPageData } from '../services/operations/pageAndComponentData'
-import CourseCard from '../components/core/Catalog/CourseCard'
-import CourseSlider from '../components/core/Catalog/CourseSlider'
-import { useSelector } from 'react-redux'
-import Error from './Error'
+import { useEffect, useState } from "react"
+import Footer from "../components/common/Footer"
+import { useParams } from "react-router-dom"
+import { apiConnector } from "../services/apiconnector"
+import { categories } from "../services/apis"
+import { getCatalogaPageData } from "../services/operations/pageAndComponentData"
+import CourseCard from "../components/core/Catalog/CourseCard"
+import CourseSlider from "../components/core/Catalog/CourseSlider"
+import { useSelector } from "react-redux"
+import Error from "./Error"
const Catalog = () => {
const { loading } = useSelector((state) => state.profile)
const { catalogName } = useParams()
const [active, setActive] = useState(1)
const [catalogPageData, setCatalogPageData] = useState(null)
- const [categoryId, setCategoryId] = useState('')
+ const [categoryId, setCategoryId] = useState("")
// Fetch all categories
useEffect(() => {
const getCategories = async () => {
- const res = await apiConnector('GET', categories.CATEGORIES_API)
+ const res = await apiConnector("GET", categories.CATEGORIES_API)
const categoryId = res?.data?.allCategories?.filter(
- (ct) => ct.name.split(' ').join('-').toLowerCase() === catalogName,
+ (ct) => ct.name.split(" ").join("-").toLowerCase() === catalogName,
)[0]._id
setCategoryId(categoryId)
}
@@ -33,7 +33,7 @@ const Catalog = () => {
try {
const res = await getCatalogaPageData(categoryId)
setCatalogPageData(res)
- console.log('res', res)
+ console.log("res", res)
} catch (error) {
console.log(error)
}
@@ -59,19 +59,19 @@ const Catalog = () => {
- {'Home / Catalog / '}{' '}
+ {"Home / Catalog / "}{" "}
- {' '}
- {catalogPageData?.data?.selectedCategory?.name}{' '}
+ {" "}
+ {catalogPageData?.data?.selectedCategory?.name}{" "}
- {' '}
- {catalogPageData?.data?.selectedCategory?.name}{' '}
+ {" "}
+ {catalogPageData?.data?.selectedCategory?.name}{" "}
- {' '}
- {catalogPageData?.data?.selectedCategory?.description}{' '}
+ {" "}
+ {catalogPageData?.data?.selectedCategory?.description}{" "}
@@ -82,23 +82,23 @@ const Catalog = () => {
setActive(1)}
>
- {' '}
- Most Populer{' '}
+ {" "}
+ Most Populer{" "}
setActive(2)}
>
- {' '}
- New{' '}
+ {" "}
+ New{" "}
@@ -128,7 +128,7 @@ const Catalog = () => {
{catalogPageData?.data?.mostSellingCourses
?.slice(0, 4)
.map((course, i) => (
-
+
))}
diff --git a/frontend/src/pages/Contact.jsx b/frontend/src/pages/Contact.jsx
index 5cce1fc..2d42be5 100644
--- a/frontend/src/pages/Contact.jsx
+++ b/frontend/src/pages/Contact.jsx
@@ -1,28 +1,28 @@
-import Footer from '../components/common/Footer'
-import ContactDetails from '../components/ContactPage/ContactDetails'
-import ContactForm from '../components/ContactPage/ContactForm'
-import ReviewSlider from '../components/common/ReviewSlider'
+import Footer from "../components/common/Footer"
+import ContactDetails from "../components/ContactPage/ContactDetails"
+import ContactForm from "../components/ContactPage/ContactForm"
+import ReviewSlider from "../components/common/ReviewSlider"
const Contact = () => {
return (
- {' '}
- {' '}
-
{' '}
+ {" "}
+
{" "}
+
{" "}
{/* Contact Details */}
- {' '}
- {' '}
-
{' '}
+ {" "}
+
{" "}
+
{" "}
{/* Contact Form */}
- {' '}
- Reviews from other learners{' '}
+ {" "}
+ Reviews from other learners{" "}
diff --git a/frontend/src/pages/CourseDetails.jsx b/frontend/src/pages/CourseDetails.jsx
index 18ca5d6..66a052e 100644
--- a/frontend/src/pages/CourseDetails.jsx
+++ b/frontend/src/pages/CourseDetails.jsx
@@ -1,21 +1,21 @@
-import { useEffect, useState } from 'react'
-import { BiInfoCircle } from 'react-icons/bi'
-import { HiOutlineGlobeAlt } from 'react-icons/hi'
-import Markdown from 'react-markdown'
-import { useDispatch, useSelector } from 'react-redux'
-import { useNavigate, useParams } from 'react-router-dom'
-import ConfirmationModal from '../components/common/ConfirmationModal'
-import Footer from '../components/common/Footer'
-import RatingStars from '../components/common/RatingStars'
-import CourseAccordionBar from '../components/core/Course/CourseAccordionBar'
-import CourseDetailsCard from '../components/core/Course/CourseDetailsCard'
-import { formatDate } from '../services/formatDate'
-import { fetchCourseDetails } from '../services/operations/courseDetailsAPI'
-import { buyCourse } from '../services/operations/studentFeaturesAPI'
-import GetAvgRating from '../utils/avgRating'
-import Error from './Error'
-import { toast } from 'react-hot-toast'
-import { ACCOUNT_TYPE } from '../../src/utils/constants'
+import { useEffect, useState } from "react"
+import { BiInfoCircle } from "react-icons/bi"
+import { HiOutlineGlobeAlt } from "react-icons/hi"
+import Markdown from "react-markdown"
+import { useDispatch, useSelector } from "react-redux"
+import { useNavigate, useParams } from "react-router-dom"
+import ConfirmationModal from "../components/common/ConfirmationModal"
+import Footer from "../components/common/Footer"
+import RatingStars from "../components/common/RatingStars"
+import CourseAccordionBar from "../components/core/Course/CourseAccordionBar"
+import CourseDetailsCard from "../components/core/Course/CourseDetailsCard"
+import { formatDate } from "../services/formatDate"
+import { fetchCourseDetails } from "../services/operations/courseDetailsAPI"
+import { buyCourse } from "../services/operations/studentFeaturesAPI"
+import GetAvgRating from "../utils/avgRating"
+import Error from "./Error"
+import { toast } from "react-hot-toast"
+import { ACCOUNT_TYPE } from "../../src/utils/constants"
function CourseDetails () {
const { user } = useSelector((state) => state.profile)
@@ -38,7 +38,7 @@ function CourseDetails () {
const res = await fetchCourseDetails(courseId)
setResponse(res)
} catch (error) {
- console.log('Could not fetch Course Details')
+ console.log("Could not fetch Course Details")
}
})()
}, [courseId])
@@ -93,7 +93,7 @@ function CourseDetails () {
instructor,
studentsEnrolled,
createdAt,
- } = response.data?.courseDetails
+ } = response.data.courseDetails
const handleBuyCourse = () => {
if (user && user?.accountType === ACCOUNT_TYPE.INSTRUCTOR) {
@@ -105,11 +105,11 @@ function CourseDetails () {
return
}
setConfirmationModal({
- text1: 'You are not logged in!',
- text2: 'Please login to Purchase Course.',
- btn1Text: 'Login',
- btn2Text: 'Cancel',
- btn1Handler: () => navigate('/login'),
+ text1: "You are not logged in!",
+ text2: "Please login to Purchase Course.",
+ btn1Text: "Login",
+ btn2Text: "Cancel",
+ btn1Handler: () => navigate("/login"),
btn2Handler: () => setConfirmationModal(null),
})
}
@@ -124,7 +124,7 @@ function CourseDetails () {
return (
<>
-
+
{/* Hero Section */}
@@ -138,15 +138,15 @@ function CourseDetails () {
- {' '}
- {courseName}{' '}
+ {" "}
+ {courseName}{" "}
-
{courseDescription}
+
{courseDescription}
{avgReviewCount}
@@ -155,30 +155,30 @@ function CourseDetails () {
- {' '}
- Created By {`${instructor.firstName} ${instructor.lastName}`}{' '}
+ {" "}
+ Created By {`${instructor.firstName} ${instructor.lastName}`}{" "}
- {' '}
- Created at {formatDate(createdAt)}{' '}
+ {" "}
+ Created at {formatDate(createdAt)}{" "}
- {' '}
- {language}{' '}
+ {" "}
+ {language}{" "}
- {' '}
- Rs. {price}{' '}
+ {" "}
+ Rs. {price}{" "}
- {' '}
- Buy Now{' '}
+ {" "}
+ Buy Now{" "}
Add to Cart
@@ -212,12 +212,12 @@ function CourseDetails () {
- {' '}
- {courseContent.length} {'section(s)'}{' '}
+ {" "}
+ {courseContent.length} {"section(s)"}{" "}
- {' '}
- {totalNoOfLectures} {'lecture(s)'}{' '}
+ {" "}
+ {totalNoOfLectures} {"lecture(s)"}{" "}
{response.data?.totalDuration} total length
@@ -227,8 +227,8 @@ function CourseDetails () {
className="text-yellow-25"
onClick={() => setIsActive([])}
>
- {' '}
- Collapse all sections{' '}
+ {" "}
+ Collapse all sections{" "}
@@ -262,8 +262,8 @@ function CourseDetails () {
{`${instructor.firstName} ${instructor.lastName}`}
- {' '}
- {instructor?.additionalDetails?.about}{' '}
+ {" "}
+ {instructor?.additionalDetails?.about}{" "}
diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx
index 716b0a1..9686192 100644
--- a/frontend/src/pages/Dashboard.jsx
+++ b/frontend/src/pages/Dashboard.jsx
@@ -1,6 +1,6 @@
-import { useSelector } from 'react-redux'
-import { Outlet } from 'react-router-dom'
-import Sidebar from '../components/core/Dashboard/Sidebar.jsx'
+import { useSelector } from "react-redux"
+import { Outlet } from "react-router-dom"
+import Sidebar from "../components/core/Dashboard/Sidebar.jsx"
function Dashboard () {
const { loading: profileLoading } = useSelector((state) => state.profile)
diff --git a/frontend/src/pages/Error.jsx b/frontend/src/pages/Error.jsx
index 2d33528..cb7ae7d 100644
--- a/frontend/src/pages/Error.jsx
+++ b/frontend/src/pages/Error.jsx
@@ -1,8 +1,8 @@
const Error = () => {
return (
- {' '}
- Error - 404 Not found{' '}
+ {" "}
+ Error - 404 Not found{" "}
)
}
diff --git a/frontend/src/pages/ForgotPassword.jsx b/frontend/src/pages/ForgotPassword.jsx
index 7215921..47c5b51 100644
--- a/frontend/src/pages/ForgotPassword.jsx
+++ b/frontend/src/pages/ForgotPassword.jsx
@@ -1,11 +1,11 @@
-import { useState } from 'react'
-import { BiArrowBack } from 'react-icons/bi'
-import { useDispatch, useSelector } from 'react-redux'
-import { Link } from 'react-router-dom'
-import { getPasswordResetToken } from '../services/operations/authAPI'
+import { useState } from "react"
+import { BiArrowBack } from "react-icons/bi"
+import { useDispatch, useSelector } from "react-redux"
+import { Link } from "react-router-dom"
+import { getPasswordResetToken } from "../services/operations/authAPI"
function ForgotPassword () {
- const [email, setEmail] = useState('')
+ const [email, setEmail] = useState("")
const [emailSent, setEmailSent] = useState(false)
const dispatch = useDispatch()
const { loading } = useSelector((state) => state.auth)
@@ -24,8 +24,8 @@ function ForgotPassword () {
: (
- {' '}
- {!emailSent ? 'Reset your password' : 'Check email'}{' '}
+ {" "}
+ {!emailSent ? "Reset your password" : "Check email"}{" "}
@@ -38,8 +38,8 @@ function ForgotPassword () {
{!emailSent && (
- {' '}
- Email Address * {' '}
+ {" "}
+ Email Address * {" "}
- {' '}
- {!emailSent ? 'Sumbit' : 'Resend Email'}{' '}
+ {" "}
+ {!emailSent ? "Sumbit" : "Resend Email"}{" "}
- {' '}
- Back To Login{' '}
+ {" "}
+ Back To Login{" "}
diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx
index 0832b9f..99658d6 100644
--- a/frontend/src/pages/Home.jsx
+++ b/frontend/src/pages/Home.jsx
@@ -1,33 +1,33 @@
-import { Link } from 'react-router-dom'
-import { FaArrowRight } from 'react-icons/fa'
-import HighlightText from '../components/core/HomePage/HighlightText'
-import Banner from '../assets/Images/banner.mp4'
-import CTAButton from '../components/core/HomePage/Button'
-import CodeBlocks from '../components/core/HomePage/CodeBlocks'
-import ExploreMore from '../components/core/HomePage/ExploreMore'
-import Footer from '../components/common/Footer'
-import InstructorSection from '../components/core/HomePage/InstructorSection'
-import LearningLanguageSection from '../components/core/HomePage/LearningLanguageSection'
-import TimelineSection from '../components/core/HomePage/TimelineSection'
-import ReviewSlider from '../components/common/ReviewSlider'
+import { Link } from "react-router-dom"
+import { FaArrowRight } from "react-icons/fa"
+import HighlightText from "../components/core/HomePage/HighlightText"
+import Banner from "../assets/Images/banner.mp4"
+import CTAButton from "../components/core/HomePage/Button"
+import CodeBlocks from "../components/core/HomePage/CodeBlocks"
+import ExploreMore from "../components/core/HomePage/ExploreMore"
+import Footer from "../components/common/Footer"
+import InstructorSection from "../components/core/HomePage/InstructorSection"
+import LearningLanguageSection from "../components/core/HomePage/LearningLanguageSection"
+import TimelineSection from "../components/core/HomePage/TimelineSection"
+import ReviewSlider from "../components/common/ReviewSlider"
function Home () {
return (
{/* Section1 */}
-
+
Become an Instructor
-
{' '}
-
{' '}
+
{" "}
+
{" "}
Empower Your Future with
- {' '}
+ {" "}
{/* here we passed "Coding Skills" text as props in component so we apply filter in that text part */}
@@ -39,16 +39,16 @@ function Home () {
- {' '}
+ {" "}
{/* here we passed "Learn More" as a children in CTAButton component and here compnent is used because there are many button like this; */}
-
- {' '}
- Learn More{' '}
- {' '}
+
+ {" "}
+ Learn More{" "}
+ {" "}
{/* here active is passed as props because if active is true then button is yellow otherwise black; */}
-
- {' '}
- Book a Demo{' '}
+
+ {" "}
+ Book a Demo{" "}
@@ -59,58 +59,58 @@ function Home () {
autoPlay
className="shadow-[20px_20px_rgba(255,255,255)]"
>
- {' '}
- {' '}
+ {" "}
+ {" "}
- Unlock Your with our
+ Unlock Your with our
online courses
}
subheading={
- 'Our courses are designed and taught by industry experts who have years of experience in coding and are passionate about sharing their knowledge with you.'
+ "Our courses are designed and taught by industry experts who have years of experience in coding and are passionate about sharing their knowledge with you."
}
ctabtn1={{
- btnText: 'Try it yourself',
- linkto: '/signup',
+ btnText: "Try it yourself",
+ linkto: "/signup",
active: true,
}}
ctabtn2={{
- btnText: 'Learn more',
- linkto: '/login',
+ btnText: "Learn more",
+ linkto: "/login",
active: false,
}}
- codeblock={'\n \n\n
This is myPage \n\n\n
\n
One Two Three \n \n'}
- codeColor={'text-yellow-25'}
+ codeblock={"\n \n\n
This is myPage \n\n\n
\n
One Two Three \n \n"}
+ codeColor={"text-yellow-25"}
backgroundGradient={
}
/>
- Start
+ Start
}
subheading={
"Go ahead, give it a try. Our hands-on learning environment means you'll be writing real code from your very first lesson."
}
ctabtn1={{
- btnText: 'Continue Lesson',
- linkto: '/signup',
+ btnText: "Continue Lesson",
+ linkto: "/signup",
active: true,
}}
- ctabtn2={{ btnText: 'Learn More', linkto: '/login', active: false }}
- codeblock={'import React from \'react\'\n import CTAButton from "./Button";\nimport TypeAnimation from "react-type";\nimport { FaArrowRight } from "react-icons/fa";\n\nconst Home = () => {\nreturn (\nHome
\n)\n}\nexport default Home;'}
- codeColor={'text-white'}
+ ctabtn2={{ btnText: "Learn More", linkto: "/login", active: false }}
+ codeblock={"import React from 'react'\n import CTAButton from \"./Button\";\nimport TypeAnimation from \"react-type\";\nimport { FaArrowRight } from \"react-icons/fa\";\n\nconst Home = () => {\nreturn (\nHome
\n)\n}\nexport default Home;"}
+ codeColor={"text-white"}
backgroundGradient={
}
/>
@@ -124,15 +124,15 @@ function Home () {
-
+
- {' '}
- Explore Full Catalog {' '}
+ {" "}
+ Explore Full Catalog {" "}
-
- {' '}
- Learn more{' '}
+
+ {" "}
+ Learn more{" "}
@@ -142,19 +142,19 @@ function Home () {
Get the Skills you need for a
-
+
- {' '}
+ {" "}
The modern StudyNotion is the dictates its own terms. Today, to
be a competitive specialist requires more than professional
- skills.{' '}
+ skills.{" "}
-
- {' '}
- Learn more{' '}
+
+ {" "}
+ Learn more{" "}
@@ -168,8 +168,8 @@ function Home () {
- {' '}
- Reviews from Other Learners{' '}
+ {" "}
+ Reviews from Other Learners{" "}
{/* Review Slider here */}
diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login.jsx
index 6aae599..7098353 100644
--- a/frontend/src/pages/Login.jsx
+++ b/frontend/src/pages/Login.jsx
@@ -1,5 +1,5 @@
-import loginImg from '../assets/Images/login.webp'
-import Template from '../components/core/Auth/Template'
+import loginImg from "../assets/Images/login.webp"
+import Template from "../components/core/Auth/Template"
function Login () {
return (
diff --git a/frontend/src/pages/Signup.jsx b/frontend/src/pages/Signup.jsx
index 46cb752..6ce4512 100644
--- a/frontend/src/pages/Signup.jsx
+++ b/frontend/src/pages/Signup.jsx
@@ -1,5 +1,5 @@
-import signupImg from '../assets/Images/signup.webp'
-import Template from '../components/core/Auth/Template'
+import signupImg from "../assets/Images/signup.webp"
+import Template from "../components/core/Auth/Template"
function Signup () {
return (
diff --git a/frontend/src/pages/UpdatePassword.jsx b/frontend/src/pages/UpdatePassword.jsx
index 9d26df2..147e893 100644
--- a/frontend/src/pages/UpdatePassword.jsx
+++ b/frontend/src/pages/UpdatePassword.jsx
@@ -1,9 +1,9 @@
-import { useState } from 'react'
-import { AiOutlineEye, AiOutlineEyeInvisible } from 'react-icons/ai'
-import { BiArrowBack } from 'react-icons/bi'
-import { useDispatch, useSelector } from 'react-redux'
-import { Link, useLocation, useNavigate } from 'react-router-dom'
-import { resetPassword } from '../services/operations/authAPI'
+import { useState } from "react"
+import { AiOutlineEye, AiOutlineEyeInvisible } from "react-icons/ai"
+import { BiArrowBack } from "react-icons/bi"
+import { useDispatch, useSelector } from "react-redux"
+import { Link, useLocation, useNavigate } from "react-router-dom"
+import { resetPassword } from "../services/operations/authAPI"
function UpdatePassword () {
const navigate = useNavigate()
@@ -12,8 +12,8 @@ function UpdatePassword () {
const { loading } = useSelector((state) => state.auth)
const [formData, setFormData] = useState({
- password: '',
- confirmPassword: '',
+ password: "",
+ confirmPassword: "",
})
const [showPassword, setShowPassword] = useState(false)
const [showConfirmPassword, setShowConfirmPassword] = useState(false)
@@ -29,7 +29,7 @@ function UpdatePassword () {
const handleOnSubmit = (e) => {
e.preventDefault()
- const token = location.pathname.split('/').at(-1)
+ const token = location.pathname.split("/").at(-1)
dispatch(resetPassword(password, confirmPassword, token, navigate))
}
@@ -42,23 +42,23 @@ function UpdatePassword () {
: (
- {' '}
- Choose new password{' '}
+ {" "}
+ Choose new password{" "}
- {' '}
- Almost done. Enter your new password and your are all set.{' '}
+ {" "}
+ Almost done. Enter your new password and your are all set.{" "}
- {' '}
- Back To Login{' '}
+ {" "}
+ Back To Login{" "}
diff --git a/frontend/src/pages/VerifyEmail.jsx b/frontend/src/pages/VerifyEmail.jsx
index a3c725e..3111481 100644
--- a/frontend/src/pages/VerifyEmail.jsx
+++ b/frontend/src/pages/VerifyEmail.jsx
@@ -1,20 +1,20 @@
-import { useEffect, useState } from 'react'
-import OtpInput from 'react-otp-input'
-import { Link, useNavigate } from 'react-router-dom'
-import { BiArrowBack } from 'react-icons/bi'
-import { RxCountdownTimer } from 'react-icons/rx'
-import { useDispatch, useSelector } from 'react-redux'
-import { sendOtp, signUp } from '../services/operations/authAPI'
+import { useEffect, useState } from "react"
+import OtpInput from "react-otp-input"
+import { Link, useNavigate } from "react-router-dom"
+import { BiArrowBack } from "react-icons/bi"
+import { RxCountdownTimer } from "react-icons/rx"
+import { useDispatch, useSelector } from "react-redux"
+import { sendOtp, signUp } from "../services/operations/authAPI"
function VerifyEmail () {
- const [otp, setOtp] = useState('')
+ const [otp, setOtp] = useState("")
const { signupData, loading } = useSelector((state) => state.auth)
const dispatch = useDispatch()
const navigate = useNavigate()
useEffect(() => {
// Only allow access of this route when user has filled the signup form
- if (!signupData) navigate('/signup')
+ if (!signupData) navigate("/signup")
}, [])
const handleVerifyAndSignup = (e) => {
@@ -51,12 +51,12 @@ function VerifyEmail () {
: (
- {' '}
- Verify Email{' '}
+ {" "}
+ Verify Email{" "}
- {' '}
- A verification code has been sent to you. Enter the code below{' '}
+ {" "}
+ A verification code has been sent to you. Enter the code below{" "}
- {' '}
- Back To Signup{' '}
+ {" "}
+ Back To Signup{" "}
dispatch(sendOtp(signupData.email, navigate))}
>
- {' '}
- Resend it{' '}
+ {" "}
+ Resend it{" "}
diff --git a/frontend/src/pages/ViewCourse.jsx b/frontend/src/pages/ViewCourse.jsx
index 658e86e..55dd392 100644
--- a/frontend/src/pages/ViewCourse.jsx
+++ b/frontend/src/pages/ViewCourse.jsx
@@ -1,16 +1,16 @@
-import { useEffect, useState } from 'react'
-import { useDispatch, useSelector } from 'react-redux'
-import { Outlet, useParams } from 'react-router-dom'
+import { useEffect, useState } from "react"
+import { useDispatch, useSelector } from "react-redux"
+import { Outlet, useParams } from "react-router-dom"
-import CourseReviewModal from '../components/core/ViewCourse/CourseReviewModal'
-import VideoDetailsSidebar from '../components/core/ViewCourse/VideoDetailsSidebar'
-import { getFullDetailsOfCourse } from '../services/operations/courseDetailsAPI'
+import CourseReviewModal from "../components/core/ViewCourse/CourseReviewModal"
+import VideoDetailsSidebar from "../components/core/ViewCourse/VideoDetailsSidebar"
+import { getFullDetailsOfCourse } from "../services/operations/courseDetailsAPI"
import {
setCompletedLectures,
setCourseSectionData,
setEntireCourseData,
setTotalNoOfLectures,
-} from '../slices/viewCourseSlice'
+} from "../slices/viewCourseSlice"
export default function ViewCourse () {
const { courseId } = useParams()
@@ -43,7 +43,7 @@ export default function ViewCourse () {
- {reviewModal && }{' '}
+ {reviewModal && }{" "}
{/* when we open reviewModal or click on review then CourseReviewModal will be active */}
>
)