Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User is successfully sent to fresh new page upon contact form submission #91

Merged
merged 1 commit into from
Sep 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 127 additions & 75 deletions src/components/pages/collaboration.js
Original file line number Diff line number Diff line change
@@ -1,88 +1,140 @@
import "../styles/contact.css";
import Customnav from "../layout/customnavbar";
import {
FaLinkedin,
FaGithubSquare,
FaTwitterSquare,
FaYoutube,
FaTelegram,
FaLinkedin,
FaGithubSquare,
FaTwitterSquare,
FaYoutube,
FaTelegram,
} from "react-icons/fa";
import useForm from '../hooks/useForm'
import validator from '../utilities/validator'
// import { Card } from "react-bootstrap";

function Collaboration() {
const{handleChange, values , handleSubmit , errors} = useForm(validator)


return (
<div className="contact">
<Customnav color="#01bfd9" height="50px" padding="5vh" />
<div className="contact__Packet">
<h1>Contact Us</h1>
<div className="contact__container">
<div className="contactContainer__left">
<div className="contactContainer__left-info">
<h4>Contact Information</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aspernatur magnam quis autem inventore laboriosam dicta dolorem error ea, suscipit nobis ut, similique velit vitae explicabo.</p>
</div>
<div className="contactContainer__leftIcons">
<a href="https://github.com/codeflow201" target="_blank" rel="noreferrer" className='contactContainer__leftIcon'>
<FaGithubSquare className='contact__icon' size={23.5} />
</a>
<a href="https://www.linkedin.com/company/codefloworg/" target="_blank" rel="noreferrer" className='contactContainer__leftIcon'>
<FaLinkedin className='contact__icon' size={23.5} />
</a>
<a href="https://twitter.com/codefloworg" target="_blank" rel="noreferrer" className='contactContainer__leftIcon'>
<FaTwitterSquare className='contact__icon' size={23.5} />
</a>
<a href="https://www.youtube.com/channel/UCIsECRBRWOalTC51co-tJWg"
target="_blank" rel="noreferrer" className='contactContainer__leftIcon'>
<FaYoutube className='contact__icon' size={23.5} />
</a>
<a href="https://t.me/joinchat/FdJhyMumJK5sryCv" target="_blank" rel="noreferrer" className='contactContainer__leftIcon'>
<FaTelegram className='contact__icon' size={23.5} />
</a>
</div>
</div>
<form onSubmit={handleSubmit}>
<div className="form__first">
<div className="form__first-group">
<label>First Name </label>
<input onChange={handleChange} value={values.firstname} name='firstname' type="text"/>
{errors.firstname && <p>{errors.firstname}</p>}
</div>
<div className="form__first-group">
<label>Last Name </label>
<input onChange={handleChange} value={values.lastname} name='lastname' type="text"/>
{errors.lastname && <p>{errors.lastname}</p>}
</div>
</div>
<div className="form__first">
<div className="form__first-group">
<label>E-Mail </label>
<input onChange={handleChange} value={values.email} name='email' type="email"/>
{errors.email && <p>{errors.email}</p>}
</div>
<div className="form__first-group">
<label>Phone-No </label>
<input onChange={handleChange} value={values.phone} name='phone' type="tel"/>
{errors.phone && <p>{errors.phone}</p>}
</div>
</div>
<div className="form__first">
<div className="form__first-group">
<label>Message </label>
<textarea onChange={handleChange} value={values.message} name='message'></textarea>
{errors.message && <p>{errors.message}</p>}
</div>
</div>
<button type='submit' className='form__btn'> Submit</button>
</form>
</div>
</div>
</div>
);
return ( <
div className = "contact" >
<
Customnav color = "#01bfd9"
height = "50px"
padding = "5vh" / >
<
div className = "contact__Packet" >
<
h1 > Contact Us < /h1> <
div className = "contact__container" >
<
div className = "contactContainer__left" >
<
div className = "contactContainer__left-info" >
<
h4 > Contact Information < /h4> <
p > Lorem ipsum dolor sit amet consectetur adipisicing elit.Aspernatur magnam quis autem inventore laboriosam dicta dolorem error ea, suscipit nobis ut, similique velit vitae explicabo. < /p> < /
div > <
div className = "contactContainer__leftIcons" >
<
a href = "https://github.com/codeflow201"
target = "_blank"
rel = "noreferrer"
className = 'contactContainer__leftIcon' >
<
FaGithubSquare className = 'contact__icon'
size = { 23.5 }
/> < /
a > <
a href = "https://www.linkedin.com/company/codefloworg/"
target = "_blank"
rel = "noreferrer"
className = 'contactContainer__leftIcon' >
<
FaLinkedin className = 'contact__icon'
size = { 23.5 }
/> < /
a > <
a href = "https://twitter.com/codefloworg"
target = "_blank"
rel = "noreferrer"
className = 'contactContainer__leftIcon' >
<
FaTwitterSquare className = 'contact__icon'
size = { 23.5 }
/> < /
a > <
a href = "https://www.youtube.com/channel/UCIsECRBRWOalTC51co-tJWg"
target = "_blank"
rel = "noreferrer"
className = 'contactContainer__leftIcon' >
<
FaYoutube className = 'contact__icon'
size = { 23.5 }
/> < /
a > <
a href = "https://t.me/joinchat/FdJhyMumJK5sryCv"
target = "_blank"
rel = "noreferrer"
className = 'contactContainer__leftIcon' >
<
FaTelegram className = 'contact__icon'
size = { 23.5 }
/> < /
a > <
/div> < /
div > <
form action = "https://formcarry.com/s/S2thQbCqEvW"
method = "POST" >
<
div className = "form__first" >
<
div className = "form__first-group" >
<
label > First Name < /label> <
input name = 'firstname'
type = "text" / >

<
/div> <
div className = "form__first-group" >
<
label > Last Name < /label> <
input name = 'lastname'
type = "text" / >
<
/div> < /
div > <
div className = "form__first" >
<
div className = "form__first-group" >
<
label > E - Mail < /label> <
input name = 'email'
type = "email" / >
<
/div> <
div className = "form__first-group" >
<
label > Phone - No < /label> <
input name = 'phone'
type = "tel" / >
<
/div> < /
div > <
div className = "form__first" >
<
div className = "form__first-group" >
<
label > Message < /label> <
textarea name = 'message' > < /textarea> < /
div > <
/div> <
button type = 'submit'
className = 'form__btn' > Submit < /button> < /
form > <
/div> < /
div > <
/div>
);
}

export default Collaboration;
export default Collaboration;
Loading