diff --git a/docusaurus.config.js b/docusaurus.config.js index 41fac199..d89f2262 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -44,6 +44,14 @@ const config = { title: 'Report an Issue', url : 'https://github.com/rsksmart/devportal/issues', }, + requestArticle : { + title: 'Request an Article', + form : { + id : '5qQ40ScPu', + title : 'Request a New Article', + description : 'Looking for information we haven’t covered? Fill out the form below to request a new article, and we’ll consider it in future updates.', + } + }, } }, // GitHub pages deployment config. diff --git a/src/components/FeedbackForm/index.js b/src/components/FeedbackForm/index.js index 8174d0a4..166b6c10 100644 --- a/src/components/FeedbackForm/index.js +++ b/src/components/FeedbackForm/index.js @@ -1,160 +1,7 @@ -import React, {useState, useEffect} from "react"; +import React, {useState} from "react"; import Translate from '@docusaurus/Translate'; -import Modal from 'react-bootstrap/Modal'; -import {useFormspark} from "@formspark/use-formspark"; -function MyVerticallyCenteredModal(props) { - const [url, setUrl] = useState('#'); - - const [submit, submitting] = useFormspark({ - formId: `vg6LeINWT`, - }); - - const [message, setMessage] = useState(""); - const [email, setEmail] = useState(""); - const [name, setName] = useState(""); - - const [sending, setSending] = useState(false); - const [submitted, setSubmitted] = useState(false); - - const totalStars = 5; - const [rating, setRating] = useState(props.rating || 0); - const [hover, setHover] = useState(null); - - useEffect(() => { - setRating(props.rating); - - if (window) { - setUrl(window.location.origin + window.location.pathname); - } - }, [props.rating, props.show]); - - const onSubmit = async (e) => { - if (submitting) return; - - e.preventDefault(); - setSending(true); - await submit( - {message, email, name, rating, url} - ); - setSubmitted(true); - setSending(false); - setMessage(""); - setEmail(""); - setName(""); - setRating(0); - setTimeout(() => { - setSubmitted(false); - }, 4000) - }; - - return ( - - - - - Thank you for your feedback! - -

We would love to hear your thoughts and feedback so that we can improve these Docs for you and others!

-
- Current rating -
- {[...Array(totalStars)].map((star, index) => { - const currentRating = index + 1; - - return ( - - ); - })} -
-
-
-
- - setName(e.target.value)} - /> - setEmail(e.target.value)} - /> - -