Skip to content

Commit

Permalink
fix workflow fail issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya committed Feb 13, 2024
1 parent 3b6549a commit 68f55c9
Show file tree
Hide file tree
Showing 81 changed files with 1,226 additions and 1,234 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/workflow_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ name: Backend CI
on:
push:
branches: [ main ]
paths:
- 'backend/**'
pull_request:
branches: [ main ]
paths:
- 'backend/**'

jobs:
build:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/workflow_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ name: React CI
on:
push:
branches: [ main ]
paths:
- 'frontend/**'
pull_request:
branches: [ main ]
paths:
- 'frontend/**'


jobs:
Expand Down
58 changes: 29 additions & 29 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
34 changes: 17 additions & 17 deletions frontend/src/components/ContactPage/ContactDetails.jsx
Original file line number Diff line number Diff line change
@@ -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: '[email protected]',
icon: "HiChatBubbleLeftRight",
heading: "Chat on us",
description: "Our friendly team is here to help.",
details: "[email protected]",
},
{
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",
},
]

Expand All @@ -37,8 +37,8 @@ const ContactDetails = () => {
<div className="flex flex-row items-center gap-3">
<Icon size={25} />
<h1 className="text-lg font-semibold text-richblack-5">
{' '}
{ele?.heading}{' '}
{" "}
{ele?.heading}{" "}
</h1>
</div>

Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/ContactPage/ContactForm.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import ContactUsForm from './ContactUsForm'
import ContactUsForm from "./ContactUsForm"

const ContactForm = () => {
return (
<div className="border border-richblack-600 text-richblack-300 rounded-xl p-7 lg:p-14 flex gap-3 flex-col">
<h1 className="text-4xl leading-10 font-semibold text-richblack-5">
{' '}
Got a Idea? We&apos;ve got the skills. Let&apos;s team up{' '}
{" "}
Got a Idea? We&apos;ve got the skills. Let&apos;s team up{" "}
</h1>
<p className="">
{' '}
Tell us more about yourself and what you&apos;re got in mind.{' '}
{" "}
Tell us more about yourself and what you&apos;re got in mind.{" "}
</p>
<div className="mt-7">
<ContactUsForm />
Expand Down
80 changes: 40 additions & 40 deletions frontend/src/components/ContactPage/ContactUsForm.jsx
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -15,26 +15,26 @@ 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)
}

useEffect(() => {
if (isSubmitSuccessful) {
reset({
email: '',
firstname: '',
lastname: '',
message: '',
phoneNo: '',
email: "",
firstname: "",
lastname: "",
message: "",
phoneNo: "",
})
}
}, [reset, isSubmitSuccessful])
Expand All @@ -47,7 +47,7 @@ const ContactUsForm = () => {
<div className="flex flex-col gap-5 lg:flex-row">
<div className="flex flex-col gap-2 lg:w-[48%]">
<label htmlFor="firstname" className="lable-style">
{' '}
{" "}
First Name <sup className="text-pink-200">*</sup>
</label>
<input
Expand All @@ -56,19 +56,19 @@ const ContactUsForm = () => {
id="firstname"
placeholder="Enter first name"
className="form-style"
{...register('firstname', { required: true })}
{...register("firstname", { required: true })}
/>
{errors.firstname && (
<span className="-mt-1 text-[12px] text-yellow-100">
{' '}
Please enter your name.{' '}
{" "}
Please enter your name.{" "}
</span>
)}
</div>

<div className="flex flex-col gap-2 lg:w-[48%]">
<label htmlFor="lastname" className="lable-style">
{' '}
{" "}
Last Name
</label>
<input
Expand All @@ -77,14 +77,14 @@ const ContactUsForm = () => {
id="lastname"
placeholder="Enter last name"
className="form-style"
{...register('lastname')}
{...register("lastname")}
/>
</div>
</div>

<div className="flex flex-col gap-2">
<label htmlFor="email" className="lable-style">
{' '}
{" "}
Email Address <sup className="text-pink-200">*</sup>
</label>
<input
Expand All @@ -93,19 +93,19 @@ const ContactUsForm = () => {
id="email"
placeholder="Enter email address"
className="form-style"
{...register('email', { required: true })}
{...register("email", { required: true })}
/>
{errors.email && (
<span className="-mt-1 text-[12px] text-yellow-100">
{' '}
Please enter your Email address.{' '}
{" "}
Please enter your Email address.{" "}
</span>
)}
</div>

<div className="flex flex-col gap-2">
<label htmlFor="phonenumber" className="lable-style">
{' '}
{" "}
Phone Number <sup className="text-pink-200">*</sup>
</label>

Expand All @@ -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 (
<option key={i} value={ele.code}>
{' '}
{ele.code} - {ele.country}{' '}
{" "}
{ele.code} - {ele.country}{" "}
</option>
)
})}
Expand All @@ -137,29 +137,29 @@ 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" },
})}
/>
</div>
</div>

{errors.phoneNo && (
<span className="-mt-1 text-[12px] text-yellow-100">
{' '}
{errors.phoneNo.message}{' '}
{" "}
{errors.phoneNo.message}{" "}
</span>
)}
</div>

<div className="flex flex-col gap-2">
<label htmlFor="message" className="lable-style">
{' '}
{" "}
Message <sup className="text-pink-200">*</sup>
</label>
<textarea
Expand All @@ -169,12 +169,12 @@ const ContactUsForm = () => {
rows="7"
placeholder="Enter your message here"
className="form-style"
{...register('message', { required: true })}
{...register("message", { required: true })}
/>
{errors.message && (
<span className="-mt-1 text-[12px] text-yellow-100">
{' '}
Please enter your Message.{' '}
{" "}
Please enter your Message.{" "}
</span>
)}
</div>
Expand All @@ -184,7 +184,7 @@ const ContactUsForm = () => {
type="submit"
className={`rounded-md bg-yellow-50 px-6 py-3 text-center text-[13px] font-bold text-black shadow-[2px_2px_0px_0px_rgba(255,255,255,0.18)]
${!loading &&
'transition-all duration-200 hover:scale-95 hover:shadow-none'
"transition-all duration-200 hover:scale-95 hover:shadow-none"
} disabled:bg-richblack-500 sm:text-[16px] `}
>
Send Message
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/common/ConfirmationModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import IconBtn from './IconBtn'
import React from "react"
import PropTypes from "prop-types"
import IconBtn from "./IconBtn"

const ConfirmationModal = ({ modalData }) => (
<div className="fixed inset-0 z-[1000] !mt-0 grid place-items-center overflow-auto bg-white bg-opacity-10 backdrop-blur-sm">
Expand Down
Loading

0 comments on commit 68f55c9

Please sign in to comment.