Skip to content

Commit

Permalink
Merge pull request #64 from abinth11/features-about-contact-pages
Browse files Browse the repository at this point in the history
Features about contact pages
  • Loading branch information
abinth11 authored Aug 4, 2023
2 parents 6f5944c + 897ec25 commit c6439a1
Show file tree
Hide file tree
Showing 18 changed files with 271 additions and 191 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ yarn-error.log

# Backend
/server/node_modules/
/server/dist/
/server/build/

# Frontend
/client/node_modules/
# /client/build/
/client/build/

# Environment variables
.env
Expand Down
6 changes: 3 additions & 3 deletions client/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.8cb7bdf5.css",
"main.js": "/static/js/main.14926365.js",
"main.js": "/static/js/main.c52d4754.js",
"static/js/321.2ea6dcfd.chunk.js": "/static/js/321.2ea6dcfd.chunk.js",
"static/js/557.0a6a1d5c.chunk.js": "/static/js/557.0a6a1d5c.chunk.js",
"static/js/282.dbce14c5.chunk.js": "/static/js/282.dbce14c5.chunk.js",
Expand Down Expand Up @@ -44,7 +44,7 @@
"static/js/126.5078c282.chunk.js": "/static/js/126.5078c282.chunk.js",
"index.html": "/index.html",
"main.8cb7bdf5.css.map": "/static/css/main.8cb7bdf5.css.map",
"main.14926365.js.map": "/static/js/main.14926365.js.map",
"main.c52d4754.js.map": "/static/js/main.c52d4754.js.map",
"321.2ea6dcfd.chunk.js.map": "/static/js/321.2ea6dcfd.chunk.js.map",
"557.0a6a1d5c.chunk.js.map": "/static/js/557.0a6a1d5c.chunk.js.map",
"282.dbce14c5.chunk.js.map": "/static/js/282.dbce14c5.chunk.js.map",
Expand Down Expand Up @@ -88,6 +88,6 @@
},
"entrypoints": [
"static/css/main.8cb7bdf5.css",
"static/js/main.14926365.js"
"static/js/main.c52d4754.js"
]
}
2 changes: 1 addition & 1 deletion client/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://res.cloudinary.com/dwucedjmy/image/upload/v1689655073/logo-no-background_avwjsd.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="manifest.json"/><title>TutorTrek</title><script defer="defer" src="/static/js/main.14926365.js"></script><link href="/static/css/main.8cb7bdf5.css" rel="stylesheet"></head><body class="bg-slate-700"><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://res.cloudinary.com/dwucedjmy/image/upload/v1689655073/logo-no-background_avwjsd.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="manifest.json"/><title>TutorTrek</title><script defer="defer" src="/static/js/main.c52d4754.js"></script><link href="/static/css/main.8cb7bdf5.css" rel="stylesheet"></head><body class="bg-slate-700"><div id="root"></div></body></html>
3 changes: 0 additions & 3 deletions client/build/static/js/main.14926365.js

This file was deleted.

146 changes: 0 additions & 146 deletions client/build/static/js/main.14926365.js.LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion client/build/static/js/main.14926365.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/components/elements/profile-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from "react";
import React from "react";
import {
Typography,
Button,
Expand Down Expand Up @@ -87,7 +87,7 @@ export default function ProfileMenu() {
alt='candice wu'
className='border border-blue-500 p-0.5'
src={
student.studentDetails?.profilePic.url|| USER_AVATAR
student.studentDetails?.profilePic?.url|| USER_AVATAR
}
/>
<ChevronDownIcon
Expand Down
47 changes: 47 additions & 0 deletions client/src/components/pages/about/about-us.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from "react";

const AboutUs: React.FC = () => {
return (
<div className=' p-12'>
<h1 className='text-3xl ml-5 font-semibold mb-4'>About Tutortrek</h1>
<div className='flex flex-col md:flex-row space-x-0 md:space-x-8'>
<div className='md:w-1/2 ml-5 '>
<img
src='https://res.cloudinary.com/dwucedjmy/image/upload/v1691134082/photo-1524178232363-1fb2b075b655_enawoh.avif'
alt='About Tutortrek'
className='rounded-lg w-10/12 shadow-md'
/>
</div>
<div className='md:w-1/2'>
<p className='text-gray-600 mb-4'>
Welcome to Tutortrek, your ultimate destination for online learning
and growth. We're on a mission to bring education to your
fingertips, connecting passionate teachers with eager learners from
around the world.
</p>
<p className='text-gray-600 mb-4'>
Our platform offers a diverse range of courses, both free and paid,
to cater to your learning needs. From mastering new skills to
advancing your career, Tutortrek provides you with a dynamic
learning experience that fits your schedule.
</p>
<p className='text-gray-600 mb-4'>
What sets us apart is our thriving community. Engage in lively
discussions with fellow learners and instructors, dive into
collaborative projects, and exchange insights in our dedicated
community spaces. And for those seeking a more interactive
experience, our live channels provide real-time communication with
teachers and peers.
</p>
<p className='text-gray-600'>
Join Tutortrek today and embark on a journey of knowledge,
empowerment, and connection. Let's explore, learn, and grow
together!
</p>
</div>
</div>
</div>
);
};

export default AboutUs;
15 changes: 15 additions & 0 deletions client/src/components/pages/community/community-home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

const CommunityHome: React.FC = () => {
return (
<div className="flex items-start justify-center min-h-screen mt-5 ">
<div className="bg-white mt-5 p-8 rounded-lg">
<h1 className="text-2xl font-semibold mb-4">Coming Soon!</h1>
<p className="text-gray-600">We're working on creating an awesome community for you.</p>
<p className="text-gray-600">Stay tuned for updates and exciting features!</p>
</div>
</div>
);
};

export default CommunityHome;
87 changes: 87 additions & 0 deletions client/src/components/pages/contact/contact-us.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import React, { useState } from "react";

const ContactUs: React.FC = () => {
const [name, setName] = useState("");
const [email, setEmail] = useState("");
const [message, setMessage] = useState("");
const [submitted, setSubmitted] = useState(false);

const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
// TODO: Add logic to submit the form data to your backend or handle it as needed
// For demonstration purposes, we'll just set the submitted state to true
setSubmitted(true);
};

return (
<div className="flex justify-center items-center p-10">
<div className="px-4 py-8 w-3/4">
<h1 className="text-3xl font-semibold mb-4">Contact Us</h1>
{submitted ? (
<p className="text-green-500 mb-4">
Your message has been submitted. We'll get back to you soon!
</p>
) : (
<form onSubmit={handleSubmit}>
<div className="mb-4">
<label
htmlFor="name"
className="block text-gray-700 font-medium mb-2"
>
Your Name
</label>
<input
type="text"
id="name"
className="w-full border rounded px-3 py-2 ring-1 ring-inset ring-gray-100 focus:ring-2 focus:ring-inset focus:ring-indigo-700 focus-visible:outline-none focus-visible:ring-blue-600 sm:text-sm sm:leading-6"
value={name}
onChange={(e) => setName(e.target.value)}
required
/>
</div>
<div className="mb-4">
<label
htmlFor="email"
className="block text-gray-700 font-medium mb-2"
>
Your Email
</label>
<input
type="email"
id="email"
className="w-full border rounded px-3 py-2 ring-1 ring-inset ring-gray-100 focus:ring-2 focus:ring-inset focus:ring-indigo-700 focus-visible:outline-none focus-visible:ring-blue-600 sm:text-sm sm:leading-6"
value={email}
onChange={(e) => setEmail(e.target.value)}
required
/>
</div>
<div className="mb-4">
<label
htmlFor="message"
className="block text-gray-700 font-medium mb-2"
>
Your Message
</label>
<textarea
id="message"
className="w-full border rounded px-3 py-2 ring-1 ring-inset ring-gray-100 focus:ring-2 focus:ring-inset focus:ring-indigo-700 focus-visible:outline-none focus-visible:ring-blue-600 sm:text-sm sm:leading-6"
rows={4}
value={message}
onChange={(e) => setMessage(e.target.value)}
required
/>
</div>
<button
type="submit"
className="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600"
>
Submit
</button>
</form>
)}
</div>
</div>
);
};

export default ContactUs;
2 changes: 1 addition & 1 deletion client/src/components/pages/student-dash/profile-from.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const ProfileForm:React.FC<Props> = ({editMode,setEditMode}) => {
</div>
<div className='p-5 flex '>
<Avatar
src={previewImage || studentInfo?.profilePic.url ||USER_AVATAR}
src={previewImage || studentInfo?.profilePic?.url ||USER_AVATAR}
alt='avatar'
size='xl'
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const StudentLoginPage: React.FC = () => {
refreshToken,
}: { accessToken: string; refreshToken: string } = response.data;
dispatch(setToken({ accessToken, refreshToken,userType:"student" }));
response.data.status === "success" && navigate("/");
response?.data?.status === "success" && navigate("/");
} catch (error: any) {
toast.error(error?.data?.message, {
position: toast.POSITION.BOTTOM_RIGHT,
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/partials/student-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function StudentFooter() {
variant="small"
className="mb-4 text-center font-normal text-blue-gray-900 md:mb-0"
>
&copy; {currentYear} <a href="https://material-tailwind.com/">Material Tailwind</a>. All
&copy; {currentYear} <a href="https://material-tailwind.com/">Tutortrek</a>. All
Rights Reserved.
</Typography>
<div className="flex gap-4 text-blue-gray-900 sm:justify-center">
Expand Down
2 changes: 1 addition & 1 deletion client/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ const CONFIG_KEYS = {
GOOGLE_AUTH_CLIENT_ID: process.env.REACT_APP_CLIENT_ID as string,
STRIPE_PUBLISHABLE_KEY: process.env.REACT_APP_STRIPE_PUBLISHABLE_KEY as string,
REDIRECT_URI: process.env.REACT_APP_REDIRECT_URI as string,
API_BASE_URL: process.env.API_BASE_URL as string,
API_BASE_URL: process.env.REACT_APP_API_BASE_URL as string,
};
export default CONFIG_KEYS;
Loading

0 comments on commit c6439a1

Please sign in to comment.