From 9699b38d3ac956c8fc3a40e161d69dcbcd452bcd Mon Sep 17 00:00:00 2001 From: dev-chiefworks Date: Sat, 28 May 2022 09:48:01 -0400 Subject: [PATCH] Contact us page --- src/Config/config.js | 4 ++- src/Services/ContactData.js | 10 +++++++ src/components/Contact/Forms.js | 46 +++++++++++++++++++++++---------- 3 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 src/Services/ContactData.js diff --git a/src/Config/config.js b/src/Config/config.js index 339ad83..6bb14e1 100644 --- a/src/Config/config.js +++ b/src/Config/config.js @@ -15,7 +15,9 @@ function getConfig() { "linked_link": "https://www.linkedin.com/company/wrenchboard/", "support_email": 'support@wrenchboard.com', "support_phone": '404 855-7966', - "support_us_address": 'Atlanta,GA 30339', + "support_phone_ng": '(+420) 336 476 328', + "support_us_address": 'Cumberland Pkwy, Atlanta GA 30339', + "support_ng_address": 'Saka Tinubu Street, Victoria Island Lagos, Nigeria', "dummy": "2018-06-25T18:54:22.000Z", "user_service_endpoint": "https://dashboard.wrenchboard.com/svs/user", } diff --git a/src/Services/ContactData.js b/src/Services/ContactData.js new file mode 100644 index 0000000..5d07526 --- /dev/null +++ b/src/Services/ContactData.js @@ -0,0 +1,10 @@ +import Axios from 'axios'; +import getConfig from './../Config/config' + +async function ContactData(callData) { + var site = getConfig()[0]; + let response = await Axios.post(site.user_service_endpoint + "/sitecontact", callData); + return response.data.result_list; +} + +export default ContactData; \ No newline at end of file diff --git a/src/components/Contact/Forms.js b/src/components/Contact/Forms.js index 2785f7e..0638084 100644 --- a/src/components/Contact/Forms.js +++ b/src/components/Contact/Forms.js @@ -1,6 +1,28 @@ import React from 'react'; +import getConfig from './../../Config/config' function Forms() { + + var site = getConfig()[0]; + + function handleSubmit(e) { + e.preventDefault(); + console.log('You clicked submit.'); + console.log(e); + debugger; + const firstname = e.target['f-name'].value; + const lastname = e.target['l-name'].value; + const email = e.target['email'].value; + + const phone = e.target['phone'].value; + const subject = e.target['subject'].value; + const message = e.target['message'].value; + const terms = e.target['terms-conditions'].checked; +alert(terms); + + } + + return ( <>
@@ -14,14 +36,12 @@ function Forms() {
Headquaters

- Cumberland Pkwy, Atlanta -
GA 30339 + {site.support_us_address}

- Saka Tinubu Street, Victoria Island -
Lagos, Nigeria + {site.support_ng_address}

@@ -29,31 +49,31 @@ function Forms() {
Phone

- (+1) 404 855-7966 + {site.support_phone}
- (+420) 336 476 328 + {site.support_phone_ng}

Support

- support@wrenchboard.com + {site.support_email}

Follow Us
- + - + - +
@@ -62,7 +82,7 @@ function Forms() {

Let’s Connect

-
+
@@ -84,7 +104,7 @@ function Forms() { />
- +