From ab218a5559dfa01e2df9252c6784875929fb8347 Mon Sep 17 00:00:00 2001 From: Krittin SETDHAVANICH Date: Mon, 3 Jul 2023 15:27:01 +0700 Subject: [PATCH] Maybe Final, still need to add more questions --- index.html | 2 +- {src => public}/images/syntax.jpeg | Bin public/logo.svg | 1 - src/App.jsx | 37 +- src/assets/logo.svg | 1056 +++++++++++++++++++++++++++- src/components/Contacter.jsx | 236 +++---- src/components/Contacts.jsx | 4 +- src/components/Faq.jsx | 317 ++++----- src/components/Hero.jsx | 54 -- src/components/Loader.jsx | 52 +- src/components/Menu.jsx | 9 +- src/components/Navbar.jsx | 180 ++--- src/components/Preproblems.jsx | 38 +- src/components/Problems.css | 17 +- src/components/Problems.jsx | 168 ++--- src/components/SocialMedia.jsx | 77 +- src/components/canvas/Earth.jsx | 64 +- src/components/canvas/Stars.jsx | 64 +- src/components/canvas/index.js | 2 +- src/components/index.css | 4 - src/components/index.js | 22 +- src/constants/Card.jsx | 42 +- src/constants/index.js | 208 +++--- src/hoc/SectionWrapper.jsx | 32 +- src/index.css | 330 ++++----- src/main.jsx | 6 +- src/styles.js | 32 +- src/utils/motion.js | 148 ++-- 28 files changed, 2049 insertions(+), 1153 deletions(-) rename {src => public}/images/syntax.jpeg (100%) delete mode 100644 public/logo.svg delete mode 100644 src/components/Hero.jsx delete mode 100644 src/components/index.css diff --git a/index.html b/index.html index 693b9d1..8f00d09 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + SOS CAMP | 12TH diff --git a/src/images/syntax.jpeg b/public/images/syntax.jpeg similarity index 100% rename from src/images/syntax.jpeg rename to public/images/syntax.jpeg diff --git a/public/logo.svg b/public/logo.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 5c2098c..24c67e5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,26 +1,25 @@ -import { BrowserRouter } from "react-router-dom"; -import { Routes, Route } from 'react-router-dom'; -import { Menu, Navbar, Contacts, StarsCanvas, Problems, Faq } from "./components"; +import {BrowserRouter, Route, Routes} from "react-router-dom"; +import {Contacts, Faq, Menu, Navbar, Problems} from "./components"; import "./index.css" import "./components/Problems.css" const App = () => { - return ( - -
-
- - - } /> - } /> - } /> - } /> - } /> - -
-
-
- ); + return ( + +
+
+ + + }/> + }/> + }/> + }/> + }/> + +
+
+
+ ); } export default App; diff --git a/src/assets/logo.svg b/src/assets/logo.svg index e7b8dfb..7ab530b 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -1 +1,1055 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Contacter.jsx b/src/components/Contacter.jsx index 5922720..2eaa14e 100644 --- a/src/components/Contacter.jsx +++ b/src/components/Contacter.jsx @@ -1,135 +1,135 @@ -import React, { useRef, useState } from "react"; -import { motion } from "framer-motion"; +import React, {useRef, useState} from "react"; +import {motion} from "framer-motion"; import emailjs from "@emailjs/browser"; -import { styles } from "../styles"; -import { SectionWrapper } from "../hoc"; -import { slideIn } from "../utils/motion"; +import {styles} from "../styles"; +import {SectionWrapper} from "../hoc"; +import {slideIn} from "../utils/motion"; import EarthCanvas from "./canvas/Earth.jsx"; const Contact = () => { - const formRef = useRef(); - const [form, setForm] = useState({ - name: "", - email: "", - message: "", - }); - - const [loading, setLoading] = useState(false); - - const handleChange = (e) => { - const { target } = e; - const { name, value } = target; - - setForm({ - ...form, - [name]: value, + const formRef = useRef(); + const [form, setForm] = useState({ + name: "", + email: "", + message: "", }); - }; - const handleSubmit = (e) => { - e.preventDefault(); - setLoading(true); + const [loading, setLoading] = useState(false); - emailjs - .send( - import.meta.env.VITE_APP_EMAILJS_SERVICE_ID, - import.meta.env.VITE_APP_EMAILJS_TEMPLATE_ID, - { - from_name: form.name, - to_name: "JJ", - from_email: form.email, - to_email: "Jwizzed@outlook.com", - message: form.message, - }, - import.meta.env.VITE_APP_EMAILJS_PUBLIC_KEY - ) - .then( - () => { - setLoading(false); - alert("Thank you. I will get back to you as soon as possible."); + const handleChange = (e) => { + const {target} = e; + const {name, value} = target; - setForm({ - name: "", - email: "", - message: "", - }); - }, - (error) => { - setLoading(false); - console.error(error); + setForm({ + ...form, + [name]: value, + }); + }; - alert("Ahh, something went wrong. Please try again."); - } - ); - }; + const handleSubmit = (e) => { + e.preventDefault(); + setLoading(true); - return ( -
- -

Get in touch

-

Contact.

+ emailjs + .send( + import.meta.env.VITE_APP_EMAILJS_SERVICE_ID, + import.meta.env.VITE_APP_EMAILJS_TEMPLATE_ID, + { + from_name: form.name, + to_name: "JJ", + from_email: form.email, + to_email: "Jwizzed@outlook.com", + message: form.message, + }, + import.meta.env.VITE_APP_EMAILJS_PUBLIC_KEY + ) + .then( + () => { + setLoading(false); + alert("Thank you. I will get back to you as soon as possible."); -
{ + setLoading(false); + console.error(error); + + alert("Ahh, something went wrong. Please try again."); + } + ); + }; + + return ( +
- - -