Skip to content

Commit

Permalink
feat: removed unused warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardoZapicoLopezNeira committed Feb 10, 2024
1 parent e348187 commit e9311d5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
4 changes: 1 addition & 3 deletions src/components/Bases.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React, { useState, useEffect } from "react";
import { Features } from "./features";
import React from "react";
import { Navigation } from "./navigation";
import JsonData from "../data/data.json";

export const Bases = (props) => {

Expand Down
2 changes: 0 additions & 2 deletions src/components/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React, { useState, useEffect } from "react";
import { Header } from "./header";
import { Features } from "./features";
import { Testimonials } from "./testimonials";
import { Team } from "./Team";
import { Contact } from "./contact";
import {Navigation} from "./navigation";
import JsonData from "../data/data.json";
import SmoothScroll from "smooth-scroll";


export const Home = (props) => {
Expand Down
34 changes: 1 addition & 33 deletions src/components/contact.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
import { useState } from "react";
import emailjs from "emailjs-com";
import React from "react";

const initialState = {
name: "",
email: "",
message: "",
};
export const Contact = (props) => {
const [{ name, email, message }, setState] = useState(initialState);

const handleChange = (e) => {
const { name, value } = e.target;
setState((prevState) => ({ ...prevState, [name]: value }));
};
const clearState = () => setState({ ...initialState });

export const Contact = (props) => {

const handleSubmit = (e) => {
e.preventDefault();
console.log(name, email, message);

{/* replace below with your own Service ID, Template ID and Public Key from your EmailJS account */ }

emailjs
.sendForm("YOUR_SERVICE_ID", "YOUR_TEMPLATE_ID", e.target, "YOUR_PUBLIC_KEY")
.then(
(result) => {
console.log(result.text);
clearState();
},
(error) => {
console.log(error.text);
}
);
};
return (
<div>
<div id="contact">
Expand Down

0 comments on commit e9311d5

Please sign in to comment.