diff --git a/src/app/HomePage.js b/src/app/HomePage.js
index bcea051..b135b1f 100644
--- a/src/app/HomePage.js
+++ b/src/app/HomePage.js
@@ -5,11 +5,14 @@ import {
Box,
Button,
Flex,
+ IconButton,
Input,
+ Textarea,
useColorModeValue,
useTheme,
useToast,
} from "@chakra-ui/core";
+import { CloseIcon } from "@chakra-ui/icons";
import { useHistory, useLocation } from "react-router-dom";
import { useLazyQuery } from "@apollo/client";
@@ -64,6 +67,8 @@ function HomePage() {
+
+
);
}
@@ -241,6 +246,197 @@ function SubmitPetForm() {
);
}
+function FeedbackFormSection() {
+ const [isOpen, setIsOpen] = React.useState(false);
+ const borderColor = useColorModeValue("gray.300", "blue.400");
+
+ const openButtonRef = React.useRef(null);
+ const emailFieldRef = React.useRef(null);
+
+ React.useLayoutEffect(() => {
+ if (isOpen) {
+ if (emailFieldRef.current) {
+ emailFieldRef.current.focus();
+ }
+ } else {
+ if (openButtonRef.current) {
+ openButtonRef.current.focus();
+ }
+ }
+ }, [isOpen]);
+
+ return (
+ setIsOpen(true))}
+ >
+
+
+
+
+
+ }
+ size="xs"
+ variant="ghost"
+ onClick={() => setIsOpen(false)}
+ isDisabled={!isOpen}
+ />
+
+
+ setIsOpen(true)}
+ openButtonRef={openButtonRef}
+ />
+
+
+ setIsOpen(false)}
+ emailFieldRef={emailFieldRef}
+ />
+
+
+
+ );
+}
+
+function FeedbackFormPitch({ isDisabled, onClick, openButtonRef }) {
+ return (
+
+ Hi friends! Welcome to the beta!
+
+ This is the new Dress to Impress! It's ready for the future, and it even
+ works great on mobile! More coming soon!
+
+
+ Tell us what you think →
+
+
+ );
+}
+
+function FeedbackForm({ isDisabled, onClose, emailFieldRef }) {
+ const [content, setContent] = React.useState("");
+ const toast = useToast();
+
+ return (
+ {
+ e.preventDefault();
+ toast({
+ title: "Ah, well, this form isn't hooked up yet!",
+ description:
+ "That's coming soon! 😅 For now, please send an email to matchu@openneo.net. Sorry and thanks!",
+ duration: null,
+ isClosable: true,
+ });
+ }}
+ onKeyDown={(e) => {
+ if (e.key === "Escape") {
+ onClose();
+ e.stopPropagation();
+ }
+ }}
+ >
+
+
+ );
+}
+
/**
* useSupportSetup helps our support staff get set up with special access.
* If you provide ?supportSecret=... in the URL, we'll save it in a cookie and