forked from mrwyndham/fastpocket
bugfix - removed old unused code
This commit is contained in:
parent
574e072ae5
commit
91b69ce30f
|
@ -1,35 +0,0 @@
|
||||||
const fetch = require('node-fetch-commonjs')
|
|
||||||
|
|
||||||
exports.handler = async function (event) {
|
|
||||||
if (event.body === null) {
|
|
||||||
return {
|
|
||||||
statusCode: 400,
|
|
||||||
body: JSON.stringify("Payload required"),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const requestBody = JSON.parse(event.body)
|
|
||||||
|
|
||||||
//automatically generated snippet from the email preview
|
|
||||||
//sends a request to an email handler for a subscribed email
|
|
||||||
await fetch(`${process.env.URL}/.netlify/functions/emails/BookNow`, {
|
|
||||||
headers: {
|
|
||||||
"netlify-emails-secret": process.env.NEXT_PUBLIC_NETLIFY_EMAILS_SECRET,
|
|
||||||
},
|
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify({
|
|
||||||
from: process.env.NEXT_PUBLIC_NETLIFY_FROM_EMAIL,
|
|
||||||
to: requestBody.subscriberEmail,
|
|
||||||
subject: "Thanks For Booking on Sign365",
|
|
||||||
parameters: {
|
|
||||||
email: requestBody.subscriberEmail,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
|
||||||
statusCode: 200,
|
|
||||||
body: JSON.stringify("SignUp email sent!"),
|
|
||||||
};
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,44 +0,0 @@
|
||||||
const fetch = require('node-fetch-commonjs')
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
exports.handler = async function (event) {
|
|
||||||
if (event.body === null) {
|
|
||||||
return {
|
|
||||||
statusCode: 400,
|
|
||||||
body: JSON.stringify("Payload required"),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const requestBody = JSON.parse(event.body)
|
|
||||||
|
|
||||||
const file = fs.readFileSync(path.resolve("./netlify/functions/triggerLearnMoreEmail/assets/Whitepaper.pdf")).toString("base64");
|
|
||||||
|
|
||||||
//automatically generated snippet from the email preview
|
|
||||||
//sends a request to an email handler for a subscribed email
|
|
||||||
await fetch(`${process.env.URL}/.netlify/functions/emails/WhitePaper`, {
|
|
||||||
headers: {
|
|
||||||
"netlify-emails-secret": process.env.NEXT_PUBLIC_NETLIFY_EMAILS_SECRET,
|
|
||||||
},
|
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify({
|
|
||||||
from: process.env.NEXT_PUBLIC_NETLIFY_FROM_EMAIL,
|
|
||||||
to: requestBody.subscriberEmail,
|
|
||||||
subject: "Thanks For Visiting Sign365",
|
|
||||||
attachments: [{
|
|
||||||
content: file,
|
|
||||||
filename: "Whitepaper.pdf",
|
|
||||||
type: "pdf",
|
|
||||||
}],
|
|
||||||
parameters: {
|
|
||||||
email: requestBody.subscriberEmail,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
|
||||||
statusCode: 200,
|
|
||||||
body: JSON.stringify("WhitePaper email sent!"),
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
exports.handler = async function (event: Event) {
|
|
||||||
console.log(event);
|
|
||||||
return {
|
|
||||||
statusCode: 200,
|
|
||||||
body: "Hello, World!",
|
|
||||||
headers: {
|
|
||||||
"Access-Control-Allow-Origin": "http://localhost:3000", // <-- This allows any domain
|
|
||||||
// "Access-Control-Allow-Headers": "Content-Type",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// import fetch from 'node-fetch-commonjs';
|
|
||||||
|
|
||||||
// export async function handler(event) {
|
|
||||||
// if (event.body === null) {
|
|
||||||
// return {
|
|
||||||
// statusCode: 400,
|
|
||||||
// body: JSON.stringify("Payload required"),
|
|
||||||
// headers: {
|
|
||||||
// "Access-Control-Allow-Origin": "*",
|
|
||||||
// "Access-Control-Allow-Headers": "Content-Type"
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// console.log("Incoming event.body:", event.body);
|
|
||||||
// const requestBody = JSON.parse(event.body);
|
|
||||||
// if(!requestBody){
|
|
||||||
// console.log("No Body")
|
|
||||||
// }
|
|
||||||
// const url = `./.netlify/functions/emails/SignUp`;
|
|
||||||
// const email = requestBody.subscriberEmail;
|
|
||||||
// console.log("Using URL:", url);
|
|
||||||
// //automatically generated snippet from the email preview
|
|
||||||
// //sends a request to an email handler for a subscribed email
|
|
||||||
// try {
|
|
||||||
// await fetch(`/.netlify/functions/emails/SignUp`, {
|
|
||||||
// headers: {
|
|
||||||
// "netlify-emails-secret": process.env.NEXT_PUBLIC_NETLIFY_EMAILS_SECRET,
|
|
||||||
// },
|
|
||||||
// method: "POST",
|
|
||||||
// body: JSON.stringify({
|
|
||||||
// from: process.env.NEXT_PUBLIC_NETLIFY_FROM_EMAIL,
|
|
||||||
// to: email,
|
|
||||||
// subject: "Thanks For Signing Up on Sign365",
|
|
||||||
// parameters: {
|
|
||||||
// email: email,
|
|
||||||
// },
|
|
||||||
// }),
|
|
||||||
// });
|
|
||||||
// } catch (err) {
|
|
||||||
// console.log("Error sending Mailchimp email", err.message);
|
|
||||||
// return {
|
|
||||||
// statusCode: 500,
|
|
||||||
// body: JSON.stringify("Failed to send Mailchimp email."),
|
|
||||||
// headers: {
|
|
||||||
// "Access-Control-Allow-Origin": "*",
|
|
||||||
// "Access-Control-Allow-Headers": "Content-Type"
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
|
@ -1,218 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
import imageConnection from "@/images/zigzag-connection.png";
|
|
||||||
import imageGraph from "@/images/zigzag-graph.png";
|
|
||||||
import imageStreamLine from "@/images/zigzag-streamline.png";
|
|
||||||
import Image from "next/image";
|
|
||||||
import { SourceModal } from "@/types";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
const FeaturesZigzag = () => {
|
|
||||||
const tryItOnClick = () => {
|
|
||||||
const signUpModal = document.getElementById("sign-up-modal");
|
|
||||||
if (!signUpModal) return;
|
|
||||||
signUpModal.setAttribute("name", SourceModal.TryIt);
|
|
||||||
signUpModal.removeAttribute("price_id");
|
|
||||||
signUpModal.click();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section>
|
|
||||||
<div className="max-w-6xl mx-auto px-4 sm:px-6">
|
|
||||||
<div className="py-12 md:py-20 border-t border-gray-800">
|
|
||||||
{/* Section header */}
|
|
||||||
<div className="max-w-4xl mx-auto text-center pb-12 md:pb-16 group">
|
|
||||||
<button
|
|
||||||
onClick={tryItOnClick}
|
|
||||||
className="inline-flex text-lg font-semibold py-2 px-[7rem] m-2 bg-base-content bg-gradient-to-r from-primary to-secondary rounded-full mb-4 cursor-pointer group-hover:animate-bounce"
|
|
||||||
>
|
|
||||||
Try it!
|
|
||||||
</button>
|
|
||||||
<h1 className="mb-4 text-black dark:text-black ">
|
|
||||||
One Form, Zero Data Reentry
|
|
||||||
</h1>
|
|
||||||
<p className="text-xl text-black dark:text-black ">
|
|
||||||
Enter data once and let our app do the rest. We'll send the
|
|
||||||
information to your business systems, so that you don't need
|
|
||||||
to do it more than once.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Items */}
|
|
||||||
<div className="grid gap-14 text-center md:text-left">
|
|
||||||
{/* 1st item */}
|
|
||||||
<div className="md:grid md:grid-cols-12 md:gap-6 items-center">
|
|
||||||
{/* Image */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-5 lg:col-span-6 mb-8 md:mb-0 md:order-1"
|
|
||||||
data-aos="fade-up"
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
className="max-w-full mx-auto md:max-w-none h-auto"
|
|
||||||
src={imageStreamLine}
|
|
||||||
height="317"
|
|
||||||
alt="Features 01"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Content */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-7 lg:col-span-6"
|
|
||||||
data-aos="fade-right"
|
|
||||||
>
|
|
||||||
<div className="md:pr-4 lg:pr-12 xl:pr-16">
|
|
||||||
<div className="font-architects-daughter text-xl text-pink-500 mb-2">
|
|
||||||
Revolutionize Your Workflow
|
|
||||||
</div>
|
|
||||||
<h2 className="text-3xl mb-3 text-black
|
|
||||||
Streamline Your Data Collection Process
|
|
||||||
</h2>
|
|
||||||
<p className="text-lg text-black mb-4">
|
|
||||||
Sign365 removes collecting and filling forms from your
|
|
||||||
workflow through it's iOS app. You can now fill and
|
|
||||||
sign your forms without needing to do the work twice.
|
|
||||||
</p>
|
|
||||||
<ul className="text-lg text-black
|
|
||||||
<li className="flex items-center mb-2">
|
|
||||||
<span>
|
|
||||||
We give you the app to collect your surveys and forms.
|
|
||||||
You tell us where you want the information to go and we
|
|
||||||
send it.
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li className="flex items-center mb-2">
|
|
||||||
<span>
|
|
||||||
Is your GTO or labour hire company needing some forms to
|
|
||||||
collect information? We offer{" "}
|
|
||||||
<Link
|
|
||||||
className="text-secondary"
|
|
||||||
href="/blogs/free-group-training-forms"
|
|
||||||
>
|
|
||||||
free templates
|
|
||||||
</Link>{" "}
|
|
||||||
and give you the tools to make your own.
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 2nd item */}
|
|
||||||
<div className="md:grid md:grid-cols-12 md:gap-6 items-center">
|
|
||||||
{/* Image */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-5 lg:col-span-6 mb-8 md:mb-0 rtl"
|
|
||||||
data-aos="fade-up"
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
className="max-w-full mx-auto md:max-w-none h-auto"
|
|
||||||
src={imageGraph}
|
|
||||||
height="370"
|
|
||||||
alt="Features 02"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Content */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-7 lg:col-span-6"
|
|
||||||
data-aos="fade-left"
|
|
||||||
>
|
|
||||||
<div className="md:pl-4 lg:pl-12 xl:pl-16">
|
|
||||||
<div className="font-architects-daughter text-xl text-pink-500 mb-2">
|
|
||||||
More speed. Less spend
|
|
||||||
</div>
|
|
||||||
<h2 className="text-3xl mb-3 text-black ">
|
|
||||||
Save Time and Money
|
|
||||||
</h2>
|
|
||||||
<p className="text-lg text-black mb-4">
|
|
||||||
Sign365 reduces your work hours by giving you an assistant
|
|
||||||
to do all your paperwork. Got forms to store? Let{" "}
|
|
||||||
<a
|
|
||||||
className="text-secondary"
|
|
||||||
href={
|
|
||||||
"https://apps.apple.com/us/app/sign365/id1562845428"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
the app
|
|
||||||
</a>{" "}
|
|
||||||
do it!
|
|
||||||
</p>
|
|
||||||
<ul className="text-lg text-black ml-4 -mb-2 ">
|
|
||||||
<li className="flex items-center mb-2">
|
|
||||||
<span>
|
|
||||||
Get the app to collect info and free up time to focus on
|
|
||||||
other business operations.
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li className="flex items-center mb-2">
|
|
||||||
<span>
|
|
||||||
<a
|
|
||||||
className="text-secondary"
|
|
||||||
href={
|
|
||||||
"https://apps.apple.com/us/app/sign365/id1562845428"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
The app
|
|
||||||
</a>{" "}
|
|
||||||
stores your forms offline and then sends them when you
|
|
||||||
are back online. You don't need someone to send the
|
|
||||||
forms for you. You don't need someone to scan for
|
|
||||||
you. Sign365 does it.
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 3rd item */}
|
|
||||||
<div className="md:grid md:grid-cols-12 md:gap-6 items-center">
|
|
||||||
{/* Image */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-5 lg:col-span-6 mb-8 md:mb-0 md:order-1"
|
|
||||||
data-aos="fade-up"
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
className="max-w-full mx-auto aspect-square md:max-w-none h-[20rem] w-auto"
|
|
||||||
src={imageConnection}
|
|
||||||
width="540"
|
|
||||||
height="405"
|
|
||||||
alt="Features 03"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/* Content */}
|
|
||||||
<div
|
|
||||||
className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-7 lg:col-span-6"
|
|
||||||
data-aos="fade-right"
|
|
||||||
>
|
|
||||||
<div className="md:pr-4 lg:pr-12 xl:pr-16">
|
|
||||||
<div className="font-architects-daughter text-xl text-pink-500 mb-2">
|
|
||||||
Unlock Seamless Business Operations
|
|
||||||
</div>
|
|
||||||
<h2 className="text-3xl mb-3 text-black ">
|
|
||||||
Connect to Over 1000 Apps
|
|
||||||
</h2>
|
|
||||||
<p className="text-lg text-black mb-4">
|
|
||||||
Sign365 can submit information to over 1000 apps. Whether
|
|
||||||
you use Salesforce, Hubspot, or any other business app,
|
|
||||||
Sign365 has got you covered.
|
|
||||||
</p>
|
|
||||||
<ul className="text-lg text-black ml-4 -mb-2">
|
|
||||||
<li className="flex items-center mb-2">
|
|
||||||
<span>
|
|
||||||
Sign365 lets you choose where to store your forms. You
|
|
||||||
can choose which apps to connect to yourself. Or let us
|
|
||||||
do the heavy lifting!
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default FeaturesZigzag;
|
|
|
@ -1,8 +1,17 @@
|
||||||
"use client";
|
import { newsletterValidationSchema } from "@/utils/form";
|
||||||
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import NewsletterForm from "./NewsletterForm";
|
import { useForm } from "react-hook-form";
|
||||||
|
|
||||||
function Newsletter() {
|
function Newsletter() {
|
||||||
|
const {
|
||||||
|
register,
|
||||||
|
handleSubmit,
|
||||||
|
reset,
|
||||||
|
formState: { errors },
|
||||||
|
} = useForm({
|
||||||
|
resolver: yupResolver(newsletterValidationSchema),
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<div className="max-w-6xl mx-auto px-4 sm:px-6">
|
<div className="max-w-6xl mx-auto px-4 sm:px-6">
|
||||||
|
@ -12,7 +21,41 @@ function Newsletter() {
|
||||||
data-aos="fade-up"
|
data-aos="fade-up"
|
||||||
>
|
>
|
||||||
<div className="relative flex flex-col lg:flex-row justify-between items-center">
|
<div className="relative flex flex-col lg:flex-row justify-between items-center">
|
||||||
<NewsletterForm />
|
<div className="mb-6 lg:mr-16 lg:mb-0 text-center lg:text-left lg:w-1/2 text-primary-content">
|
||||||
|
<h3 className=" mb-2 text-3xl font-black">
|
||||||
|
Stay Ahead of the Curve
|
||||||
|
</h3>
|
||||||
|
<p className=" text-lg">
|
||||||
|
Join our newsletter to get top news before anyone else.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-full lg:w-1/2">
|
||||||
|
<form
|
||||||
|
onSubmit={handleSubmit((data) => {
|
||||||
|
console.log(data);
|
||||||
|
reset();
|
||||||
|
})}
|
||||||
|
className="flex flex-col sm:flex-row justify-center max-w-xs mx-auto sm:max-w-md lg:max-w-none gap-x-2"
|
||||||
|
>
|
||||||
|
<div className="w-full">
|
||||||
|
<input
|
||||||
|
id="NewsletterEmail"
|
||||||
|
type="text"
|
||||||
|
className="py-3 px-4 block w-full text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
|
placeholder="Email…"
|
||||||
|
aria-label="Email…"
|
||||||
|
{...register("email")}
|
||||||
|
/>
|
||||||
|
<div className="text-start text-sm italic text-error-content">
|
||||||
|
{errors.email?.message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button className="btn text-primary-content btn-neutral">
|
||||||
|
Subscribe
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,124 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { NewsLetterForm, SourceModal } from "@/types";
|
|
||||||
import { mailchimp } from "@/app/(auth)/actions";
|
|
||||||
import { toast } from "react-toastify";
|
|
||||||
import { ModalStatus } from "@/types";
|
|
||||||
|
|
||||||
const NewsletterForm = () => {
|
|
||||||
const [status, setStatus] = useState<ModalStatus>(ModalStatus.Default);
|
|
||||||
const [email, setEmail] = useState("");
|
|
||||||
|
|
||||||
const submitForm = async (event: React.FormEvent<HTMLFormElement>) => {
|
|
||||||
event.preventDefault();
|
|
||||||
try {
|
|
||||||
if (!email) {
|
|
||||||
throw Error("Email is Empty");
|
|
||||||
}
|
|
||||||
if (email.indexOf("@") === -1) {
|
|
||||||
throw Error("Email is invalid");
|
|
||||||
}
|
|
||||||
setStatus(ModalStatus.Loading);
|
|
||||||
const formData = {
|
|
||||||
email: email,
|
|
||||||
first_name: "",
|
|
||||||
last_name: "",
|
|
||||||
phone_number: "",
|
|
||||||
company_size: "",
|
|
||||||
source: SourceModal.Newsletter,
|
|
||||||
};
|
|
||||||
await sendMailchimpRequest(formData);
|
|
||||||
// await handleSendgridSubmit(formData.email);
|
|
||||||
setStatus(ModalStatus.Success);
|
|
||||||
} catch (error) {
|
|
||||||
if (error instanceof Error) {
|
|
||||||
toast.error(error.message, {
|
|
||||||
position: "bottom-left",
|
|
||||||
autoClose: 5000,
|
|
||||||
hideProgressBar: false,
|
|
||||||
closeOnClick: true,
|
|
||||||
pauseOnHover: true,
|
|
||||||
draggable: true,
|
|
||||||
progress: undefined,
|
|
||||||
theme: "colored",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setStatus(ModalStatus.Default);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendMailchimpRequest = async (data: NewsLetterForm) => {
|
|
||||||
console.log("sendMailchimpRequest call initiated");
|
|
||||||
await mailchimp({
|
|
||||||
email: data.email,
|
|
||||||
first_name: "",
|
|
||||||
last_name: "",
|
|
||||||
phone_number: "",
|
|
||||||
company_size: "",
|
|
||||||
source: data.source,
|
|
||||||
});
|
|
||||||
console.log("sendMailchimpRequest call success");
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSendgridSubmit = async (email: string) => {
|
|
||||||
const data = {
|
|
||||||
subscriberEmail: email,
|
|
||||||
};
|
|
||||||
//call to the Netlify Function you created
|
|
||||||
return fetch("./.netlify/functions/triggerLearnMoreEmail", {
|
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify({
|
|
||||||
subscriberEmail: data.subscriberEmail,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="mb-6 lg:mr-16 lg:mb-0 text-center lg:text-left lg:w-1/2 text-primary-content">
|
|
||||||
<h3 className=" mb-2 text-3xl font-black">
|
|
||||||
{status !== ModalStatus.Success
|
|
||||||
? "Stay Ahead of the Curve"
|
|
||||||
: "Thanks for subscribing"}
|
|
||||||
</h3>
|
|
||||||
<p className=" text-lg">
|
|
||||||
{status !== ModalStatus.Success
|
|
||||||
? "Join our newsletter to get top news before anyone else."
|
|
||||||
: "You are going to love what we have to show you"}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="w-full lg:w-1/2">
|
|
||||||
<form
|
|
||||||
onSubmit={(e) => submitForm(e)}
|
|
||||||
className="flex flex-col sm:flex-row justify-center max-w-xs mx-auto sm:max-w-md lg:max-w-none gap-x-2"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="NewsletterEmail"
|
|
||||||
type="text"
|
|
||||||
className="py-3 px-4 block w-full text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
|
||||||
placeholder="Email…"
|
|
||||||
aria-label="Email…"
|
|
||||||
// {...register("email")}
|
|
||||||
/>
|
|
||||||
{/* <input
|
|
||||||
required
|
|
||||||
name="email"
|
|
||||||
type="email"
|
|
||||||
onChange={(event) => setEmail(event.target.value)}
|
|
||||||
value={email}
|
|
||||||
className="w-full appearance-none bg-transparent border border-white focus:border-white rounded-sm px-4 py-3 mb-2 sm:mb-0 sm:mr-2 placeholder-white disabled:bg-transparent"
|
|
||||||
placeholder="Your best email…"
|
|
||||||
aria-label="Your best email…"
|
|
||||||
disabled={status === ModalStatus.Success}
|
|
||||||
autoComplete="on"
|
|
||||||
/> */}
|
|
||||||
<button className="btn btn-primary">Subscribe</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default NewsletterForm;
|
|
|
@ -6,35 +6,6 @@ export interface PostMetadata {
|
||||||
image: string;
|
image: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// export type User = {
|
|
||||||
// onClick: () => void;
|
|
||||||
// text: string;
|
|
||||||
// buttonColor: string;
|
|
||||||
// buttonHover: string;
|
|
||||||
// }
|
|
||||||
|
|
||||||
export type TextOnUse = {
|
|
||||||
title: string;
|
|
||||||
subTitle: string;
|
|
||||||
buttonText: string;
|
|
||||||
netlifyFunction: string;
|
|
||||||
source?: SourceModal;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type LearnMoreForm = {
|
|
||||||
email: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NewsLetterForm = {
|
|
||||||
email: string;
|
|
||||||
source: SourceModal;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SignInForm = {
|
|
||||||
email: string;
|
|
||||||
password?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SignUpForm = {
|
export type SignUpForm = {
|
||||||
email: string;
|
email: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
|
@ -46,23 +17,6 @@ export type SignUpForm = {
|
||||||
organisation: string;
|
organisation: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type LearnMoreValidationForm = {
|
|
||||||
EMAIL: string;
|
|
||||||
SOURCE: SourceModal;
|
|
||||||
}
|
|
||||||
export type SignInValidationForm = {
|
|
||||||
EMAIL: string;
|
|
||||||
SOURCE: SourceModal;
|
|
||||||
}
|
|
||||||
export type SignUpValidationForm = {
|
|
||||||
EMAIL: string;
|
|
||||||
FNAME: string;
|
|
||||||
LNAME: string;
|
|
||||||
PHONE: string;
|
|
||||||
CSIZE: string;
|
|
||||||
SOURCE: SourceModal;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Product = {
|
export type Product = {
|
||||||
product_id: string;
|
product_id: string;
|
||||||
active: boolean;
|
active: boolean;
|
||||||
|
@ -195,12 +149,6 @@ export type CheckoutSession = {
|
||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ModalStatus {
|
|
||||||
Success = 'success',
|
|
||||||
Loading = 'loading',
|
|
||||||
Default = 'default',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum SourceModal {
|
export enum SourceModal {
|
||||||
SignUp = 'SignUp',
|
SignUp = 'SignUp',
|
||||||
SignUpViaPurchase = 'SignUpViaPurchase',
|
SignUpViaPurchase = 'SignUpViaPurchase',
|
||||||
|
|
|
@ -70,7 +70,7 @@ const contactUsValidationSchema = Yup.object().shape({
|
||||||
email: Yup.string().email().required("E-mail is required"),
|
email: Yup.string().email().required("E-mail is required"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const learnMoreValidationSchema = Yup.object().shape({
|
const newsletterValidationSchema = Yup.object().shape({
|
||||||
email: Yup.string().email().required("E-mail is required"),
|
email: Yup.string().email().required("E-mail is required"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ const signInValidationSchema = Yup.object().shape({
|
||||||
});
|
});
|
||||||
|
|
||||||
export {
|
export {
|
||||||
learnMoreValidationSchema,
|
newsletterValidationSchema,
|
||||||
signUpValidationSchema,
|
signUpValidationSchema,
|
||||||
signInValidationSchema,
|
signInValidationSchema,
|
||||||
waitinglistValidationSchema,
|
waitinglistValidationSchema,
|
||||||
|
|
Loading…
Reference in New Issue