-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from JumboCode/translate-page
Page Translations + About Page Restyle
- Loading branch information
Showing
10 changed files
with
455 additions
and
411 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,8 @@ export default function Contact() { | |
|
||
const handleSubmit = async (e) => { | ||
e.preventDefault(); | ||
const contactData = { | ||
name: e.target.name.value, | ||
email: e.target.email.value, | ||
subject: e.target.subject.value, | ||
message: e.target.message.value | ||
}; | ||
try { | ||
const response = await postContact(contactData); | ||
const response = await postContact(formData); | ||
|
||
if (response.ok) { | ||
alert("Message submitted successfully!"); | ||
|
@@ -43,73 +37,54 @@ export default function Contact() { | |
} | ||
}; | ||
|
||
|
||
return ( | ||
<div className="w-full h-full bg-white flex flex-col sm:flex-row justify-center items-center"> | ||
<div className="sm:w-1/3 w-full p-8"> | ||
<h2 className="text-3xl font-semibold mb-6">{t("contact_heading")}</h2> | ||
<p className="mb-2 text-lg"> | ||
{t("email_field")}: | ||
<a href="mailto:[email protected]" className="text-black"> | ||
[email protected] | ||
</a> | ||
</p> | ||
<p className="text-lg"> | ||
Instagram: | ||
<a href="https://www.instagram.com/dillarenglish" className="text-black"> | ||
@dillarenglish | ||
</a> | ||
</p> | ||
</div> | ||
|
||
<div className="sm:w-2/3 w-full bg-blue-200 p-10 flex justify-center"> | ||
{/* form box */} | ||
<Form width="w-3/5"> | ||
<h2 className="text-2xl font-semibold mb-2">{t("form_heading")}</h2> | ||
<p className="mb-4 text-gray-600 opacity-70"> | ||
{t("form_description")} | ||
</p> | ||
<form | ||
onSubmit={handleSubmit} | ||
className="space-y-3" | ||
> | ||
<FormInput | ||
type="text" | ||
name="name" | ||
placeholder={t("name_field")} | ||
value={formData.name} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="email" | ||
name="email" | ||
placeholder={t("email_field")} | ||
value={formData.email} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="text" | ||
name="subject" | ||
placeholder={t("subject_field")} | ||
value={formData.subject} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="textarea" | ||
name="message" | ||
placeholder={t("message_field")} | ||
value={formData.message} | ||
onChange={handleChange} | ||
required | ||
/> | ||
<FormSubmit label={t("submit_button")} /> | ||
</form> | ||
</Form> | ||
</div> | ||
</div> | ||
<div className="w-full h-full bg-[url('/images/ice_water.png')] bg-no-repeat bg-center bg-cover flex flex-col sm:flex-row justify-center items-center"> | ||
{/* form box */} | ||
<Form width="w-1/3"> | ||
<h2 className="text-2xl font-semibold mb-2">{t("contact_heading")}</h2> | ||
<p className="mb-4 text-gray-600 opacity-70"> | ||
{t("contact_form_description")} | ||
</p > | ||
<form | ||
onSubmit={handleSubmit} | ||
className="space-y-3" | ||
> | ||
<FormInput | ||
type="text" | ||
name="name" | ||
placeholder={t("name_field")} | ||
value={formData.name} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="email" | ||
name="email" | ||
placeholder={t("email_field")} | ||
value={formData.email} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="text" | ||
name="subject" | ||
placeholder={t("subject_field")} | ||
value={formData.subject} | ||
onChange={handleChange} | ||
isRequired={true} | ||
/> | ||
<FormInput | ||
type="textarea" | ||
name="message" | ||
placeholder={t("message_field")} | ||
value={formData.message} | ||
onChange={handleChange} | ||
required | ||
/> | ||
<FormSubmit label={t("submit_button")} /> | ||
</form> | ||
</Form> | ||
</div > | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters