Skip to content

Commit

Permalink
add socket
Browse files Browse the repository at this point in the history
  • Loading branch information
thakiyudheen committed Jul 15, 2024
1 parent 1385e0c commit e6e530d
Show file tree
Hide file tree
Showing 12 changed files with 1,245 additions and 263 deletions.
3 changes: 2 additions & 1 deletion manifests/k8s/configMaps/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ data:
VITE_REACT_APP_PRESET_KEY: cogpbt77
VITE_REACT_APP_CLOUD_NAME: dy8yhxc6a
VITE_STRIPE_PUBLIC_KEY: pk_test_51PTgwvEvhq95htrivs2uETviuuagXTJYlLYPkNYzk2dEFnKUNjaL9SCl4RwQIuP7iCao6aPzNryH1uMng76lbNXZ00JyJOwxsu
VITE_SERVER_URL: https://acecart.shop/api/chat
VITE_SERVER_URL: https://acecart.shop
VITE_BASE_URL: https://acecart.shop

2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import SubscriptionPage from './Components/user/subscription/subscription';
import SubscriptionSuccess from './Pages/payment/subscriptionSuccess';
import ReApply from './Components/auth/reapply/ReApply';
import PeerVideoComponent from './Components/instructor/chat/videoCall';
import AboutUs from './Pages/student/aboutUs';



Expand Down Expand Up @@ -149,6 +150,7 @@ function App() {
<Route path="/user-profile" element={<Profile/>} />
<Route path="/payment-success" element={<PaymentSuccess/>} />
<Route path="/subscription-success" element={<SubscriptionSuccess/>} />
<Route path="/aboutUs" element={<AboutUs/>} />



Expand Down
4 changes: 2 additions & 2 deletions src/Components/common/user/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useTheme } from '../../../ui/theme-provider';
const Footer: React.FC = () => {
const { theme } = useTheme();
return (
<footer className={`${theme=='light'?'bg-white':'bg-dark'} font-Poppins p-8 md:p-8 lg:p-16 ${theme=='light'?'text-gray-700': 'md:text-gray-100'} text-[14px] font-sans`}>
<div className={`container mx-auto flex flex-col lg:flex-row justify-between ${theme=='light'?'bg-gray-200': 'bg-gray-800'} md:p-[3rem] rounded-tl-[2rem] p-4 rounded-tr-[2rem]`}>
<footer className={`${theme=='light'?'bg-white':'bg-dark'} font-Poppins p-8 md:p-8 lg:p-16 ${theme=='light'?'text-gray-700': 'md:text-gray-100'} text-[14px] font-Poppins`}>
<div className={`container mx-auto flex flex-col lg:flex-row justify-between ${theme=='light'?'bg-gray-200': 'bg-gray-800'} md:p-[3rem] rounded-tl-[2rem] p-8 rounded-tr-[2rem]`}>
<div className="mb-6 lg:mb-0">
{/* <img src="/logo.png" alt="LearnUp" className="h-10 mb-4" /> Ensure the path is correct */}
<h1 className='text-blue-600 text-[20px] font-bold w-'>learnUp</h1>
Expand Down
8 changes: 6 additions & 2 deletions src/Components/common/user/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const Navbar: React.FC = () => {
navigate('/')
} else if (buttonName == 'Course') {
navigate('/course-listing')
}else if(buttonName == 'AboutUs'){
navigate('/aboutUs')
}
};

Expand Down Expand Up @@ -69,8 +71,9 @@ const Navbar: React.FC = () => {
exit={{ x: '100%' }}
transition={{ type: 'tween', duration: 0.5 }}
>
{/* 'Teach', */}
<ul className="flex flex-col items-center space-y-4 ">
{['Home', 'Course', 'Teach', 'Contact Us', 'About Us'].map(buttonName => (
{['Home', 'Course', 'Contact Us', 'AboutUs'].map(buttonName => (
<li key={buttonName} onClick={() => handleButtonClick(buttonName)} className="table hover:bg-gray-100 p-2 rounded-md w-full text-center">
{buttonName}
</li>
Expand Down Expand Up @@ -100,8 +103,9 @@ const Navbar: React.FC = () => {
</div>
</motion.div>
</AnimatePresence>
{/* 'Teach', */}
<ul className="hidden md:flex md:items-center md:space-x-4">
{['Home', 'Course', 'Teach', 'Contact Us', 'About Us'].map(buttonName => (
{['Home', 'Course', 'Contact Us', 'AboutUs'].map(buttonName => (
<li key={buttonName} className="pl-4">
<button
className={`text-sm rounded-md px-3 py-1 text-blue-600 font-bold ${selected === buttonName && 'bg-gray-500'} ${selected === buttonName && theme == 'light' && 'md:bg-gray-300'} ${theme == 'light' ? 'hover:bg-gray-200' : 'hover:bg-gray-700'} ${theme !== 'light' && 'bg-gray-800'} ${theme !== 'light' && 'text-white'}`}
Expand Down
111 changes: 1 addition & 110 deletions src/Components/user/home/Homebanner.tsx
Original file line number Diff line number Diff line change
@@ -1,118 +1,9 @@
// import React from 'react';
// import homebanner from '../../../assets/homebanner/homebanner.png';
// import home from '../../../assets/homebanner/home.png';
// import { motion } from 'framer-motion';
// import { useNavigate } from 'react-router-dom';
// import { RootState } from '@/redux/store';
// import { useAppSelector } from '@/hooks/hooke';

// const textContainer = {
// hidden: { opacity: 1 },
// visible: {
// opacity: 1,
// transition: {
// staggerChildren: 0.5, // Stagger animation of children by 0.3 seconds
// },
// },
// };

// const textItem = {
// hidden: { opacity: 0, x: '-100%' },
// visible: { opacity: 1, x: 0 },
// };
// const variants = {
// hidden: { opacity: 0 },
// visible: { opacity: 1 },
// };


// function Homebanner() {
// const { data } = useAppSelector((state: RootState) => state.user)
// const navigate = useNavigate()
// return (
// <div className=' md:flex justify-evenly items-center w-full md:h-[500px] font-josefin '>
// <motion.div
// className="text flex-[1] md:ml-[10rem] ml-[5rem] mt-[4rem] p-4 md:mt-0"
// variants={textContainer}
// initial="hidden"
// animate="visible"
// >
// <motion.h1
// className="font-bold md:text-[40px] text-[2rem] w-[94%] md:w-[80%]"
// variants={textItem}
// >
// Grow up your skills by online courses with{' '}
// <span className="text-blue-500">learnUp</span>
// </motion.h1>
// <motion.p
// className="text-sm w-[77%] mt-2"
// variants={textItem}
// >
// TOTC is an interesting platform that will teach you in a more interactive way
// </motion.p>
// <motion.div
// className="flex mt-8"
// variants={textItem}
// >
// {
// !data?.data ? (
// <button
// className="bg-blue-700 bg-gradient-to-r from-blue-700 to-blue-700 rounded-[2rem] shadow-lg text-[1rem] py-2 px-8 text-white"
// onClick={() => navigate('/enrollment')}
// >
// Join Now
// </button>
// ) : (
// <button
// className="bg-blue-700 bg-gradient-to-r from-blue-700 to-blue-700 rounded-[2rem] shadow-lg text-[1rem] py-2 px-8 text-white"
// onClick={() => navigate('/course-listing')}
// >
// Explore More
// </button>
// )
// }


// <button
// className="bg-gray-500 ml-3 bg-gradient-to-r from-gray-500 to-gray-600 rounded-[2rem] shadow-lg text-[1rem] py-2 px-9 text-white"
// >
// View
// </button>
// </motion.div>
// </motion.div>

// {/* Motion for Image (Right to Left) */}
// <motion.div
// className="image w-full text-[1rem] md:mr-[5rem] flex-[1] mt-4 md:mt-10 flex justify-center relative"
// initial={{ opacity: 0, y: -10 }}
// animate={{ opacity: 1, y: 0 }}
// exit={{ opacity: 0, y: -20 }}
// transition={{ duration: 0.5, delay: 0.4 }}
// >

// <dotlottie-player
// src="https://lottie.host/da0e13ce-8e92-48b2-a4e5-de886d3ba9de/ZxURYoKHcB.json"
// background="transparent"
// speed=".3"
// style={{ width: '400px', height: '400px' }}
// className='mt-10'
// loop
// autoplay
// ></dotlottie-player>
// </motion.div>
// </div>
// );
// }

// export default Homebanner;


import React from 'react';
import { motion } from 'framer-motion';
import { useNavigate } from 'react-router-dom';
import { useAppSelector } from '@/hooks/hooke';
import { RootState } from '@/redux/store';
import Home from '../../../assets/homebanner/22378291_6567451.svg';
import Home from '../../../assets/homebanner/telecommuting-animate.svg';


const textItem = {
Expand Down
2 changes: 1 addition & 1 deletion src/Components/user/home/newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Newsletter: React.FC = () => {
className="p-1 rounded-l-lg border-none md:w-[20rem] w-[11rem] bg-white"
/>

<button className="bg-blue-500 text-white px-4 py-2 rounded-lg h-[60%] flex justify-center items-center relative right-[1rem] md:right-0 ">
<button className="bg-blue-500 text-white px-4 py-2 rounded-lg h-[60%] flex justify-center items-center relative right-[1rem] md:right- ">
Submit
</button>
</div>
Expand Down
148 changes: 2 additions & 146 deletions src/Pages/auth/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,147 +1,3 @@
// import React, { useState } from 'react';
// import { Formik, Field, Form, ErrorMessage } from 'formik';
// import GoogleLogo from '../../assets/google/google.svg';
// import LoginSVG from '../../assets/login/login.svg';
// import LearnUp from '../../assets/LearnUp.png';
// import { useTheme } from "../../Components/ui/theme-provider";
// import { useLocation, useNavigate } from 'react-router-dom';
// import { useAppDispatch } from '../../hooks/hooke';
// import { loginUserAction } from '../../redux/store/actions/auth/loginUserAction';
// import LoadingIndicator from '../../Components/common/skelton/loading';
// import { LoginSchema } from '../../validation-schema';
// import Navbar from '../../Components/common/user/navbar/Navbar';
// import { GoogleLogin } from '@react-oauth/google';
// import { googleAuthAction } from '../../redux/store/actions/auth/googleAuthAction';
// import { FaEye, FaEyeSlash } from 'react-icons/fa';
// import { getUserDataAction } from '../../redux/store/actions/auth/getUserDataAction';

// interface data {
// email: string;
// password: string;
// }

// const Login: React.FC = () => {
// const navigator = useNavigate();
// const location = useLocation();
// const { theme } = useTheme();
// const dispatch = useAppDispatch();
// const [isError, setError] = useState<boolean>(false);
// const [isLoading, setLoading] = useState<boolean>(false);
// const [showPassword, setShowPassword] = useState(false);

// const togglePasswordVisibility = () => {
// setShowPassword(!showPassword);
// };

// const handleSubmit = async (values: data) => {
// setLoading(true);

// const response = await dispatch(loginUserAction(values));
// console.log('this is first', response.payload);
// if (!response?.payload || !response?.payload.success) {
// setError(true);
// setTimeout(() => {
// setLoading(false);
// }, 500);
// } else {
// setError(false);
// setLoading(false);
// navigator('/');
// }
// };

// const googleAuthHandle = async (credentials: any) => {
// const response = await dispatch(googleAuthAction(credentials));

// if (response.payload.existingUser) {
// await dispatch(getUserDataAction())
// navigator('/');
// return;
// } else {
// navigator('/enrollment');
// }
// };

// return (
// <>
// <Navbar />
// <div className="w-full flex items-center justify-evenly h-screen font-sans">
// <img className='absolute md:h-[12%] h-[9%] top-0 left-0 md:left-4' src={LearnUp} alt="" />
// <img className='h-[70%]' src={LoginSVG} alt="" />
// <div className={`max-w-md w-full p-10 rounded-[10px] md:shadow-md absolute m-3 md:relative md:space-y-4 ${theme === 'light' ? 'bg-white' : 'bg-gray-800'}`}>
// <h2 className="text-2xl font-bold text-blue-500 mb-5 text-center">Login</h2>
// {isLoading && <LoadingIndicator />}
// <Formik
// initialValues={{
// email: '',
// password: '',
// }}
// validationSchema={LoginSchema}
// onSubmit={(values, { setSubmitting }) => {
// setTimeout(() => {
// setSubmitting(false);
// }, 400);
// handleSubmit(values);
// }}
// >
// {({ isSubmitting }) => (
// <Form className="space-y-4">
// {isError && <small className='text-[red] text-center'>Incorrect Email or Password</small>}
// <div>
// <Field
// type="email"
// name="email"
// placeholder="Email"
// className={`w-full px-2 py-1 ${theme === 'light' ? 'bg-white' : 'bg-gray-800'} border-b-[1px] focus:outline-none border-[grey] text-sm`}
// />
// <ErrorMessage name="email" component="div" className="text-red-500 text-[12px]" />
// </div>
// <div className="relative">
// <Field
// type={showPassword ? 'text' : 'password'}
// name="password"
// placeholder="Password"
// className={`w-full px-2 py-1 ${theme === 'light' ? 'bg-white' : 'bg-gray-800'} border-b-[1px] focus:outline-none border-[grey] text-sm`}
// />
// <div className="absolute inset-y-0 right-0 pr-3 flex items-center cursor-pointer" onClick={togglePasswordVisibility}>
// {showPassword ? <FaEyeSlash /> : <FaEye />}
// </div>
// <ErrorMessage name="password" component="div" className="text-red-500 text-[12px]" />
// </div>
// <div>
// <button
// type="submit"
// disabled={isSubmitting}
// className="w-full bg-blue-500 text-white py-2 rounded-lg hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
// >
// {isSubmitting ? 'Logging in...' : 'Login'}
// </button>
// <div className="flex items-center justify-between mt-2">
// <p className='text-[12px] text-[gray]'>I don't have any account <a onClick={() => navigator('/signup', { state: location.state })} className="text-blue-500 text-sm font-bold">Sign up</a></p>
// <a onClick={()=>navigator('/confirmMail')} className="text-blue-500 text-sm text-[12px] font-bold">Forgot Password?</a>
// </div>
// </div>
// <div className="flex items-center justify-center">
// <div>
// <GoogleLogin
// onSuccess={googleAuthHandle}
// onError={() => {
// console.log('Login Failed');
// }}
// />
// </div>
// </div>
// </Form>
// )}
// </Formik>
// </div>
// </div>
// </>
// );
// };

// export default Login;

import React, { useState } from 'react';
import { Formik, Field, Form, ErrorMessage } from 'formik';
import GoogleLogo from '../../assets/google/google.svg';
Expand Down Expand Up @@ -211,7 +67,7 @@ const Login: React.FC = () => {
return (
<>
<Navbar />
<div className="w-full flex flex-col md:flex-row items-center justify-evenly font-Poppins md:dark:bg-gray-800 h-screen font-sans">
<div className="w-full flex flex-col md:flex-row items-center justify-evenly font-Poppins md:dark:bg-gray-800 h-screen font-Poppins">
<img className='absolute md:h-[12%] h-[9%] top-0 left-0 md:left-4' src={LearnUp} alt="" />
<motion.img
className='md:h-[70%] h-[30%] md:mb-0 mb-8'
Expand All @@ -222,7 +78,7 @@ const Login: React.FC = () => {
transition={{ duration: 0.5 }}
/>
<motion.div
className={`max-w-md w-full p-10 rounded-[10px] md:shadow-md m-3 md:space-y-4 `}
className={`max-w-md w-full p-10 relative bottom-[10vh] md:bottom-0 rounded-[10px] md:shadow-md m-3 md:space-y-4 `}
initial={{ opacity: 0, y: 100 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
Expand Down
Loading

0 comments on commit e6e530d

Please sign in to comment.