diff --git a/.eslintrc.js b/.eslintrc.js index 8bcc0eb..bbd6954 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,9 +20,9 @@ module.exports = { }, }, ], - parser: "@babel/eslint-parser", + // parser: "@babel/eslint-parser", parserOptions: { - ecmaVersion: "latest", + ecmaVersion: 2020, sourceType: "module", ecmaFeatures: { jsx: true, // This is the key line - it tells ESLint to expect JSX syntax diff --git a/.github/workflows/workflow_backend.yml b/.github/workflows/workflow_backend.yml index 8232b79..36b49fa 100644 --- a/.github/workflows/workflow_backend.yml +++ b/.github/workflows/workflow_backend.yml @@ -3,12 +3,8 @@ name: Backend CI on: push: branches: [ main ] - paths: - - 'backend/**' pull_request: branches: [ main ] - paths: - - 'backend/**' jobs: build: diff --git a/.github/workflows/workflow_frontend.yml b/.github/workflows/workflow_frontend.yml index 29f48f3..6b2ec52 100644 --- a/.github/workflows/workflow_frontend.yml +++ b/.github/workflows/workflow_frontend.yml @@ -3,12 +3,8 @@ name: React CI on: push: branches: [ main ] - paths: - - 'frontend/**' pull_request: branches: [ main ] - paths: - - 'frontend/**' jobs: diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index ad9a828..6c12df0 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1,32 +1,32 @@ -import './App.css' -import { Route, Routes } from 'react-router-dom' -import Home from './pages/Home' -import Login from './pages/Login' -import Signup from './pages/Signup' -import Navbar from './components/common/Navbar' -import About from './pages/About' -import Contact from './pages/Contact' -import Error from './pages/Error' -import VerifyEmail from './pages/VerifyEmail' -import ForgotPassword from './pages/ForgotPassword' -import UpdatePassword from './pages/UpdatePassword' -import OpenRoute from './components/core/Auth/OpenRoute' -import PrivateRoute from './components/core/Auth/PrivateRoute' -import Dashboard from './pages/Dashboard' -import MyProfile from './components/core/Dashboard/MyProfile' -import Settings from './components/core/Dashboard/Settings/Settings' -import EnrolledCourses from './components/core/Dashboard/EnrolledCourses' -import Cart from './components/core/Dashboard/Cart/Cart' -import MyCourses from './components/core/Dashboard/InstructorCourses/MyCourses' -import AddCourse from './components/core/Dashboard/AddCourse' -import Instructor from './components/core/Dashboard/InstructorDashboard/InstructorDashboard' -import { ACCOUNT_TYPE } from './utils/constants' -import EditCourse from './components/core/Dashboard/EditCourse' -import { useSelector } from 'react-redux' -import Catalog from './pages/Catalog' -import CourseDetails from './pages/CourseDetails' -import ViewCourse from './pages/ViewCourse' -import VideoDetails from './components/core/ViewCourse/VideoDetails' +import "./App.css" +import { Route, Routes } from "react-router-dom" +import Home from "./pages/Home" +import Login from "./pages/Login" +import Signup from "./pages/Signup" +import Navbar from "./components/common/Navbar" +import About from "./pages/About" +import Contact from "./pages/Contact" +import Error from "./pages/Error" +import VerifyEmail from "./pages/VerifyEmail" +import ForgotPassword from "./pages/ForgotPassword" +import UpdatePassword from "./pages/UpdatePassword" +import OpenRoute from "./components/core/Auth/OpenRoute" +import PrivateRoute from "./components/core/Auth/PrivateRoute" +import Dashboard from "./pages/Dashboard" +import MyProfile from "./components/core/Dashboard/MyProfile" +import Settings from "./components/core/Dashboard/Settings/Settings" +import EnrolledCourses from "./components/core/Dashboard/EnrolledCourses" +import Cart from "./components/core/Dashboard/Cart/Cart" +import MyCourses from "./components/core/Dashboard/InstructorCourses/MyCourses" +import AddCourse from "./components/core/Dashboard/AddCourse" +import Instructor from "./components/core/Dashboard/InstructorDashboard/InstructorDashboard" +import { ACCOUNT_TYPE } from "./utils/constants" +import EditCourse from "./components/core/Dashboard/EditCourse" +import { useSelector } from "react-redux" +import Catalog from "./pages/Catalog" +import CourseDetails from "./pages/CourseDetails" +import ViewCourse from "./pages/ViewCourse" +import VideoDetails from "./components/core/ViewCourse/VideoDetails" export default function App () { const { user } = useSelector((state) => state.profile) diff --git a/frontend/src/components/ContactPage/ContactDetails.jsx b/frontend/src/components/ContactPage/ContactDetails.jsx index 45ef752..ed3db2e 100644 --- a/frontend/src/components/ContactPage/ContactDetails.jsx +++ b/frontend/src/components/ContactPage/ContactDetails.jsx @@ -1,26 +1,26 @@ -import * as Icon1 from 'react-icons/bi' -import * as Icon3 from 'react-icons/hi2' -import * as Icon2 from 'react-icons/io5' +import * as Icon1 from "react-icons/bi" +import * as Icon3 from "react-icons/hi2" +import * as Icon2 from "react-icons/io5" const contactDetails = [ { - icon: 'HiChatBubbleLeftRight', - heading: 'Chat on us', - description: 'Our friendly team is here to help.', - details: 'info@studynotion.store', + icon: "HiChatBubbleLeftRight", + heading: "Chat on us", + description: "Our friendly team is here to help.", + details: "info@studynotion.store", }, { - icon: 'BiWorld', - heading: 'Visit us', - description: 'Come and say hello at our office HQ.', + icon: "BiWorld", + heading: "Visit us", + description: "Come and say hello at our office HQ.", details: - 'E-704, Shaligram Status, Near Ashadeep School, Vip Circle, Surat, Gujarat, India - 394105', + "E-704, Shaligram Status, Near Ashadeep School, Vip Circle, Surat, Gujarat, India - 394105", }, { - icon: 'IoCall', - heading: 'Call us', - description: 'Mon - Fri From 8am to 5pm', - details: '+123 456 7869', + icon: "IoCall", + heading: "Call us", + description: "Mon - Fri From 8am to 5pm", + details: "+123 456 7869", }, ] @@ -37,8 +37,8 @@ const ContactDetails = () => {

- {' '} - {ele?.heading}{' '} + {" "} + {ele?.heading}{" "}

diff --git a/frontend/src/components/ContactPage/ContactForm.jsx b/frontend/src/components/ContactPage/ContactForm.jsx index 0bb51fe..e9f0238 100644 --- a/frontend/src/components/ContactPage/ContactForm.jsx +++ b/frontend/src/components/ContactPage/ContactForm.jsx @@ -1,15 +1,15 @@ -import ContactUsForm from './ContactUsForm' +import ContactUsForm from "./ContactUsForm" const ContactForm = () => { return (

- {' '} - Got a Idea? We've got the skills. Let's team up{' '} + {" "} + Got a Idea? We've got the skills. Let's team up{" "}

- {' '} - Tell us more about yourself and what you're got in mind.{' '} + {" "} + Tell us more about yourself and what you're got in mind.{" "}

diff --git a/frontend/src/components/ContactPage/ContactUsForm.jsx b/frontend/src/components/ContactPage/ContactUsForm.jsx index b7032b2..ccece51 100644 --- a/frontend/src/components/ContactPage/ContactUsForm.jsx +++ b/frontend/src/components/ContactPage/ContactUsForm.jsx @@ -1,9 +1,9 @@ -import { useEffect, useState } from 'react' -import { useForm } from 'react-hook-form' -import { toast } from 'react-hot-toast' -import CountryCode from '../../data/countrycode.json' -import { apiConnector } from '../../services/apiconnector' -import { contactusEndpoint } from '../../services/apis' +import { useEffect, useState } from "react" +import { useForm } from "react-hook-form" +import { toast } from "react-hot-toast" +import CountryCode from "../../data/countrycode.json" +import { apiConnector } from "../../services/apiconnector" +import { contactusEndpoint } from "../../services/apis" const ContactUsForm = () => { const [loading, setLoading] = useState(false) @@ -15,14 +15,14 @@ const ContactUsForm = () => { } = useForm() // useform is used to collect data of input box in object form (read from internet) const submitContactForm = async (data) => { - const toastId = toast.loading('Loading...') + const toastId = toast.loading("Loading...") try { setLoading(true) - await apiConnector('POST', contactusEndpoint.CONTACT_US_API, data) - toast.success('We got you data') + await apiConnector("POST", contactusEndpoint.CONTACT_US_API, data) + toast.success("We got you data") setLoading(false) } catch (error) { - console.log('ERROR MESSAGE - ', error.message) + console.log("ERROR MESSAGE - ", error.message) } toast.dismiss(toastId) } @@ -30,11 +30,11 @@ const ContactUsForm = () => { useEffect(() => { if (isSubmitSuccessful) { reset({ - email: '', - firstname: '', - lastname: '', - message: '', - phoneNo: '', + email: "", + firstname: "", + lastname: "", + message: "", + phoneNo: "", }) } }, [reset, isSubmitSuccessful]) @@ -47,7 +47,7 @@ const ContactUsForm = () => {
{ id="firstname" placeholder="Enter first name" className="form-style" - {...register('firstname', { required: true })} + {...register("firstname", { required: true })} /> {errors.firstname && ( - {' '} - Please enter your name.{' '} + {" "} + Please enter your name.{" "} )}
{ id="lastname" placeholder="Enter last name" className="form-style" - {...register('lastname')} + {...register("lastname")} />
{ id="email" placeholder="Enter email address" className="form-style" - {...register('email', { required: true })} + {...register("email", { required: true })} /> {errors.email && ( - {' '} - Please enter your Email address.{' '} + {" "} + Please enter your Email address.{" "} )}
@@ -117,13 +117,13 @@ const ContactUsForm = () => { id="firstname" placeholder="Enter first name" className="form-style" - {...register('countrycode', { required: true })} + {...register("countrycode", { required: true })} > {CountryCode.map((ele, i) => { return ( ) })} @@ -137,13 +137,13 @@ const ContactUsForm = () => { id="phonenumber" placeholder="12345 67890" className="form-style" - {...register('phoneNo', { + {...register("phoneNo", { required: { value: true, - message: 'Please enter your Phone Number.', + message: "Please enter your Phone Number.", }, - maxLength: { value: 12, message: 'Invalid Phone Number' }, - minLength: { value: 10, message: 'Invalid Phone Number' }, + maxLength: { value: 12, message: "Invalid Phone Number" }, + minLength: { value: 10, message: "Invalid Phone Number" }, })} />
@@ -151,15 +151,15 @@ const ContactUsForm = () => { {errors.phoneNo && ( - {' '} - {errors.phoneNo.message}{' '} + {" "} + {errors.phoneNo.message}{" "} )}