From 1d1b74e715462a6b6c922aa6b0be0203e6869583 Mon Sep 17 00:00:00 2001 From: OudomMunint Date: Tue, 13 Aug 2024 21:04:49 +1000 Subject: [PATCH 1/4] Chore: Project restructire/clean up --- .../About/{Techstack.js => Clients.js} | 56 +++++++------------ src/components/About/Toolstack.js | 33 ----------- 2 files changed, 21 insertions(+), 68 deletions(-) rename src/components/About/{Techstack.js => Clients.js} (62%) delete mode 100644 src/components/About/Toolstack.js diff --git a/src/components/About/Techstack.js b/src/components/About/Clients.js similarity index 62% rename from src/components/About/Techstack.js rename to src/components/About/Clients.js index c18ddc9..d51d563 100644 --- a/src/components/About/Techstack.js +++ b/src/components/About/Clients.js @@ -1,6 +1,5 @@ import React from "react"; import { Col, Row } from "react-bootstrap"; -import { CgCPlusPlus } from "react-icons/cg"; import pubArt from "../../Assets/publicartworkers.png"; import nsw from "../../Assets/nsw.svg"; import local from "../../Assets/local.png"; @@ -8,65 +7,52 @@ import nw from "../../Assets/nw.png"; import air from "../../Assets/air.png"; import tina from "../../Assets/tina.png"; import nag from "../../Assets/nag.png"; -import { - DiJavascript1, - DiReact, - DiNodejs, - DiMongodb, - DiPython, - DiGit, -} from "react-icons/di"; -import { - SiPytorch, - SiFirebase, - SiNextdotjs, -} from "react-icons/si"; +// import { +// DiJavascript1, +// DiReact, +// DiNodejs, +// DiMongodb, +// DiPython, +// DiGit, +// } from "react-icons/di"; +// import { +// SiPytorch, +// SiFirebase, +// SiNextdotjs, +// } from "react-icons/si"; -function Techstack() { +function Clients() { return ( - {/* */} avatar + - {/* */} avatar + - {/* */} avatar + - {/* */} avatar + - {/* */} avatar + - {/* */} avatar + - {/* */} avatar - {/* - - - - - - - - - - - */} ); } -export default Techstack; +export default Clients; \ No newline at end of file diff --git a/src/components/About/Toolstack.js b/src/components/About/Toolstack.js deleted file mode 100644 index 619d86d..0000000 --- a/src/components/About/Toolstack.js +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react"; -import { Col, Row } from "react-bootstrap"; -import { - SiLinux, - SiVisualstudiocode, - SiPostman, - SiHeroku, - SiVercel, -} from "react-icons/si"; - -function Toolstack() { - return ( - - - - - - - - - - - - - - - - - - ); -} - -export default Toolstack; From 5c370e24cdf142a3a9481285ff850874a5e49495 Mon Sep 17 00:00:00 2001 From: OudomMunint Date: Tue, 13 Aug 2024 21:05:29 +1000 Subject: [PATCH 2/4] Compiler Warnings #81 + Code clean up --- src/App.js | 2 +- src/components/About/About.js | 4 ++-- src/components/Home/Home.js | 18 +++++++++--------- src/index.js | 3 +-- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/App.js b/src/App.js index 2663cfd..e9203ca 100644 --- a/src/App.js +++ b/src/App.js @@ -17,7 +17,7 @@ import ScrollToTop from "./components/ScrollToTop"; import "./style.css"; import "./App.css"; import "bootstrap/dist/css/bootstrap.min.css"; -import Home2 from "./components/Home/Home2"; +//import Home2 from "./components/Home/Home2"; function App() { const [load, upadateLoad] = useState(true); diff --git a/src/components/About/About.js b/src/components/About/About.js index 9cd94d4..bc171f1 100644 --- a/src/components/About/About.js +++ b/src/components/About/About.js @@ -1,6 +1,6 @@ import React from "react"; import Particle from "../Particle"; -import Techstack from "./Techstack"; +import Clients from "./Clients"; import Home2 from "../Home/Home2" import { Container } from "react-bootstrap"; @@ -54,7 +54,7 @@ function About() {

(This we will change to the logos of those we worked with)

- + {/*

Tools I use diff --git a/src/components/Home/Home.js b/src/components/Home/Home.js index 5711d44..79f1f28 100644 --- a/src/components/Home/Home.js +++ b/src/components/Home/Home.js @@ -1,18 +1,18 @@ import React from "react"; import { Container, Row, Col } from "react-bootstrap"; -import homeLogo from "../../Assets/about.png"; +//import homeLogo from "../../Assets/about.png"; import Particle from "../Particle"; -import Home2 from "./Home2"; +//import Home2 from "./Home2"; import Type from "./Type"; import {ReactComponent as Design} from "../../Assets/design.svg"; -import { - AiFillGithub, - AiOutlineTwitter, - AiFillInstagram, - AiFillDribbbleCircle, -} from "react-icons/ai"; -import { FaLinkedinIn } from "react-icons/fa"; +// import { +// AiFillGithub, +// AiOutlineTwitter, +// AiFillInstagram, +// AiFillDribbbleCircle, +// } from "react-icons/ai"; +// import { FaLinkedinIn } from "react-icons/fa"; function Home() { return ( diff --git a/src/index.js b/src/index.js index 2250d9c..55e3cf5 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,6 @@ ReactDOM.render( document.getElementById("root") ); -// WIP: Enable web vitals report generation only in development mode const isDevelopment = process.env.NODE_ENV === "development"; ReactDOM.render( @@ -26,5 +25,5 @@ if (isDevelopment) { } else { - console.log("Web vitals report generation is disabled in production mode"); + console.log("Web vitals report generation is disabled in production"); } \ No newline at end of file From 562770c80ee6080159f6b8a1ded87aeb429a2b12 Mon Sep 17 00:00:00 2001 From: OudomMunint Date: Tue, 13 Aug 2024 21:06:31 +1000 Subject: [PATCH 3/4] Update form submission logic and add test data for dev env, Compiler Warnings #81 --- src/components/Contact.js | 108 ++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/src/components/Contact.js b/src/components/Contact.js index bb1c095..e96b4cf 100644 --- a/src/components/Contact.js +++ b/src/components/Contact.js @@ -1,75 +1,95 @@ import React, { useState } from "react"; function ContactForm() { + const isDevelopment = process.env.NODE_ENV === "development"; const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [message, setMessage] = useState(""); const handleSubmit = async (event) => { event.preventDefault(); - const data = { name, email, message }; + let data = { name, email, message }; try { - console.log('Form submission successful:'); // clear form setName(''); setEmail(''); setMessage(''); + data = { name: "testUser1", email: "test@test.com", message: "Hello, this is a test message." }; + console.log('Form submission successful:'); + console.log(data); } catch (error) { console.error('Form submission error:', error); console.log('Error caught'); } }; + if (isDevelopment) { + try { + document.getElementsByClassName("submit").addEventListener("click", handleSubmit); + } + catch (error) { + console.error('Error:', error); + } + } + else { + try { + document.getElementsByClassName("submit").removeEventListener("click", handleSubmit); + } + catch (error) { + console.error('Error:', error); + } + } + return ( -<> + <> -
-
-
- - - -
-
Get in touch!
-
- - - {/* Name */} -
- - setName(e.target.value)} - placeholder="Name" - required /> +
+
+
+ + +
+
Get in touch!
+ + - {/* Email */} -
- - setEmail(e.target.value)} - placeholder="Email" - required/> -
+ {/* Name */} +
+ + setName(e.target.value)} + placeholder="Name" + required /> +
- {/* Message */} -
- -