Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
logonoff committed Nov 3, 2024
1 parent adc902f commit 818601d
Show file tree
Hide file tree
Showing 28 changed files with 1,183 additions and 1,151 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Robotics Website

Built using React
Built using React
34 changes: 17 additions & 17 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import js from "@eslint/js";
import globals from "globals";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";

export default [
{ ignores: ['dist'] },
{ ignores: ["dist"] },
{
files: ['**/*.{js,jsx}'],
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaVersion: "latest",
ecmaFeatures: { jsx: true },
sourceType: 'module',
sourceType: "module",
},
},
settings: { react: { version: '18.3' } },
settings: { react: { version: "18.3" } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...react.configs["jsx-runtime"].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
"react/jsx-no-target-blank": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
]
];
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Robotics Website"
/>
<meta name="description" content="Robotics Website" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="icon" type="image/png" href="./favicon.png" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.18.1/build/cssreset/cssreset-min.css">
<link
rel="stylesheet"
type="text/css"
href="http://yui.yahooapis.com/3.18.1/build/cssreset/cssreset-min.css"
/>
<title>UTM Robotics</title>
</head>
<body>
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"prettier": "prettier --write ."
},
"dependencies": {
"@emailjs/browser": "^4.4.1",
Expand All @@ -19,14 +20,15 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^18.3.12",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.13.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-react": "^7.37.2",
"eslint": "^9.13.0",
"globals": "^15.11.0",
"prettier": "^3.3.3",
"vite": "^5.4.10"
}
}
25 changes: 12 additions & 13 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";

import Home from './components/Home';
import About from './components/About';
import Contact from './components/Contact';
import Home from "./components/Home";
// import About from './components/About';
// import Contact from './components/Contact';

const App = () => {
return (
<Router>
<Routes>
<Route path="/" element={<Home />} />
{/* <Route path="/about" element={<About />} />
return (
<Router>
<Routes>
<Route path="/" element={<Home />} />
{/* <Route path="/about" element={<About />} />
<Route path="/contact" element={<Contact />} /> */}
</Routes>
</Router>
);
</Routes>
</Router>
);
};

export default App;
86 changes: 42 additions & 44 deletions src/components/About.jsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
import React, { useEffect } from 'react';
import { FaLinkedin, FaGithub } from 'react-icons/fa';
import { useEffect } from "react";
import { FaLinkedin, FaGithub } from "react-icons/fa";

import Header from './Header';
import Footer from './Footer'
import Blurb from './Blurb';
// import Header from './Header';
// import Footer from './Footer'
import Blurb from "./Blurb";

import "../styles/About.css"
import teamPhoto from '../assets/memberPhotos/teamPhoto.jpg'
import { MEMBERS } from './details/teamDetails';
import "../styles/About.css";
// import teamPhoto from '../assets/memberPhotos/teamPhoto.jpg'
import { MEMBERS } from "./details/teamDetails";

const About = () => {
// Fade in and up.
useEffect(() => {
const aboutContainer = document.querySelector('.aboutContainer');
aboutContainer.classList.add('fade-in-up');
}, []);

return (
<div>
<div className="aboutContainer" id='aboutContainer'>

<Blurb/>

<div className="team-section-container">
<h1 className='meet-the-team'>Meet the Team</h1>

<div className="teamContainer">
{MEMBERS.map((member) => (
<div key={member.id} className="teamMember">
<img src={member.image} alt={member.name}/>
<div className="desc">
<div className="title">
<h3 className="name">{member.name}</h3>
{/* <div className="social-icons">
// Fade in and up.
useEffect(() => {
const aboutContainer = document.querySelector(".aboutContainer");
aboutContainer.classList.add("fade-in-up");
}, []);

return (
<div>
<div className="aboutContainer" id="aboutContainer">
<Blurb />

<div className="team-section-container">
<h1 className="meet-the-team">Meet the Team</h1>

<div className="teamContainer">
{MEMBERS.map((member) => (
<div key={member.id} className="teamMember">
<img src={member.image} alt={member.name} />
<div className="desc">
<div className="title">
<h3 className="name">{member.name}</h3>
{/* <div className="social-icons">
<a href={`${member.linkedin}`} target="_blank" rel="noopener noreferrer">
<FaLinkedin className="linkedin-icon" />
</a>
<a href={`${member.github}`} target="_blank" rel="noopener noreferrer">
<FaGithub className="github-icon"/>
</a>
</div> */}
</div>
<p className="role">{member.role}</p>
<p className="bio">{member.bio}</p>
</div>
</div>
))}
</div>
</div>
</div>
</div>
);
</div>
<p className="role">{member.role}</p>
<p className="bio">{member.bio}</p>
</div>
</div>
))}
</div>
</div>
</div>
</div>
);
};


export default About;
5 changes: 4 additions & 1 deletion src/components/Blurb.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const Blurb = () => {
title="Students"
description="We aim to foster student interest and engagement in the field of Robotics through different events. Apart from workshops, we also offer general meetings where we host speakers, watch Battlebots, and help students interested in tinkering with Arduinos."
/>
<GoalCell title="Collaborations" description="Engage in projects between clubs with our collaborative projects!" />
<GoalCell
title="Collaborations"
description="Engage in projects between clubs with our collaborative projects!"
/>
</div>
</div>
</div>
Expand Down
72 changes: 46 additions & 26 deletions src/components/Contact.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import React, { useState, useEffect } from 'react';
import emailjs from '@emailjs/browser';
import Header from './Header';
import Footer from './Footer';
import '../styles/Contact.css';
import React, { useState, useEffect } from "react";
import emailjs from "@emailjs/browser";
import Header from "./Header";
import Footer from "./Footer";
import "../styles/Contact.css";

const Contact = () => {
useEffect(() => {
const aboutContainer = document.querySelector('.contactContainer');
aboutContainer.classList.add('fade-in-up');
const aboutContainer = document.querySelector(".contactContainer");
aboutContainer.classList.add("fade-in-up");
}, []);

const [formData, setFormData] = useState({
name: '',
email: '',
message: ''
name: "",
email: "",
message: "",
});

const handleChange = (e) => {
Expand All @@ -23,32 +23,52 @@ const Contact = () => {
const handleSubmit = (e) => {
e.preventDefault();

emailjs.sendForm(import.meta.env.REACT_APP_EMAILJS_SERVICE_ID, import.meta.env.REACT_APP_EMAILJS_TEMPLATE_ID, e.target, import.meta.env.REACT_APP_EMAILJS_PUBLIC_KEY)
.then((result) => {
alert("Thanks for contacting us! We'll be in touch within 1-2 business days.");
}, (error) => {
alert("Oops, the email couldn't send! Try again tomorrow, or email us with our email instead.");
});
emailjs
.sendForm(
import.meta.env.REACT_APP_EMAILJS_SERVICE_ID,
import.meta.env.REACT_APP_EMAILJS_TEMPLATE_ID,
e.target,
import.meta.env.REACT_APP_EMAILJS_PUBLIC_KEY,
)
.then(
(result) => {
alert(
"Thanks for contacting us! We'll be in touch within 1-2 business days.",
);
},
(error) => {
alert(
"Oops, the email couldn't send! Try again tomorrow, or email us with our email instead.",
);
},
);

setFormData({ name: '', email: '', message: '' });
setFormData({ name: "", email: "", message: "" });
};

return (
<div id='contactForm'>
<div className='contactContainer'>
<h2 id='title'>Email us directly, or contact us using the form anonymously!</h2>

<div className='info'>
<div className='contactInfo'>
<div id="contactForm">
<div className="contactContainer">
<h2 id="title">
Email us directly, or contact us using the form anonymously!
</h2>

<div className="info">
<div className="contactInfo">
<h2>Email</h2>
<p>[email protected]</p>

<h2>Address</h2>
<p>Hacklab, Deerfield Hall<br/>1535 Outer Circle<br/>Mississauga, ON</p>
<p>
Hacklab, Deerfield Hall
<br />
1535 Outer Circle
<br />
Mississauga, ON
</p>
</div>

<form className='contactForm' onSubmit={handleSubmit}>
<form className="contactForm" onSubmit={handleSubmit}>
<label>
Name:
<input
Expand Down Expand Up @@ -85,6 +105,6 @@ const Contact = () => {
</div>
</div>
);
}
};

export default Contact;
Loading

0 comments on commit 818601d

Please sign in to comment.