import { Alert, Box, Button, ButtonDropdown, FormField, Input, Modal, SpaceBetween, TextContent } from "@awsui/components-react"; import React from "react"; import { externalUrls } from "../../constants/externalUrls"; interface Props { visible: boolean; setModalVisible: any; } export const CustomerFeedbackModal: React.FC = React.memo(({ visible, setModalVisible }) => { const [inputValue, setInputValue] = React.useState(""); const [categoryType, setCategory] = React.useState("Feedback Category"); const [isCategoryEmpty, setIsCategoryEmpty] = React.useState(false); const [isValueEmpty, setIsValueEmpty] = React.useState(false); return ( setModalVisible(false)} visible={visible} closeAriaLabel="Close modal" size="medium" footer={ } header={Send feedback?} > setIsValueEmpty(false)} visible={isValueEmpty} dismissAriaLabel="Close alert" header="No Feedback Entered" > Please enter in non-empty feedback. setIsCategoryEmpty(false)} visible={isCategoryEmpty} dismissAriaLabel="Close alert" header="Feedback Category Not Selected" > Please select a category for your feedback. All feedback will be sent to the .NET Porting Assistant team via email. { setIsCategoryEmpty(false); if (e.detail.id === "general") { setCategory("General"); } else if (e.detail.id === "question") { setCategory("Question"); } else { setCategory("Error"); //enter additional logic for searching for any errors on screen to send to team } }} > {categoryType} { setInputValue(event.detail.value); setIsValueEmpty(false); }} placeholder="Enter feedback" /> {categoryType === "Error" ? ( To help us investigate the issue, please include the logs located here: {window.electron.getLogFolder()} ) : null}
); });