From 1c2d723b955c801b674cfdff4d1bcd5152c5e7ef Mon Sep 17 00:00:00 2001 From: Jessica Leach Date: Mon, 4 Jan 2021 09:27:56 +0000 Subject: [PATCH] simplify mailchimp --- .../Container/components/MailingList.js | 75 +------------------ .../__snapshots__/Container.test.jsx.snap | 47 +----------- .../__snapshots__/Mailinglist.test.jsx.snap | 47 +----------- app/javascript/scimo/styles/style.scss | 6 +- 4 files changed, 13 insertions(+), 162 deletions(-) diff --git a/app/javascript/bundles/Container/components/MailingList.js b/app/javascript/bundles/Container/components/MailingList.js index 1153f21c..c30a27ed 100644 --- a/app/javascript/bundles/Container/components/MailingList.js +++ b/app/javascript/bundles/Container/components/MailingList.js @@ -1,62 +1,21 @@ import React from "react"; import $ from "jquery"; -{ - /* - */ -} - class MailingList extends React.Component { constructor(props) { super(props); this.state = { emailValue: "", - fNameValue: "", - lNameValue: "" }; } - onSubmit() { - preventDefault(); - - $.ajax({ - type: $form.attr("method"), - url: $form.attr("action"), - data: $form.serialize(), - cache: false, - dataType: "json", - contentType: "application/json; charset=utf-8", - error: function(err) { - $(".notification_container").html( - 'Could not connect to server. Please try again later.' - ); - }, - success: function(data) { - if (data.result != "success") { - var message = data.msg.substring(); - $(".notification_container").html( - '' + message + "" - ); - } else { - var message = data.msg; - $(".notification_container").html( - '' + message + "" - ); - } - } - }); - } - render() { return (