diff --git a/frontend/src/container/AppLayout/FeedBack/index.tsx b/frontend/src/container/AppLayout/FeedBack/index.tsx deleted file mode 100644 index 13e0279806..0000000000 --- a/frontend/src/container/AppLayout/FeedBack/index.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { CloseCircleOutlined, CommentOutlined } from '@ant-design/icons'; -import { Button, Divider, Form, Input, notification, Typography } from 'antd'; -import { Callbacks } from 'rc-field-form/lib/interface'; -import React, { useCallback, useState } from 'react'; - -import { - Button as IconButton, - ButtonContainer, - Card, - CenterText, - Container, - TitleContainer, - FormItem, -} from './styles'; -const { Title } = Typography; -const { TextArea } = Input; -import sendFeedbackApi from 'api/userFeedback/sendFeedback'; - -const Feedback = (): JSX.Element => { - const [isOpen, setisOpen] = useState(false); - const [form] = Form.useForm(); - const [isLoading, setIsLoading] = useState(false); - - const [notifications, Element] = notification.useNotification(); - - const isToggleHandler = useCallback(() => { - setisOpen((state) => !state); - }, []); - - const onFinishHandler: Callbacks['onFinish'] = async ( - value: Feedback, - ): Promise => { - try { - setIsLoading(true); - const { feedback, email = '' } = value; - - const response = await sendFeedbackApi({ - email, - message: feedback, - }); - - if (response === 200) { - notifications.success({ - message: 'Thanks for your feedback!', - description: - 'We have noted down your feedback and will work on improving SIgNoz based on that!', - }); - - isToggleHandler(); - } else { - notifications.error({ - message: 'Error!', - description: 'Something went wrong', - }); - } - setIsLoading(false); - } catch (error) { - notifications.error({ - message: 'Something went wrong', - }); - setIsLoading(false); - } - }; - - return ( - - {!isOpen && ( - - - - )} - - {Element} - - {isOpen && ( -
- - - - How can we improve SigNoz? - - - - - - - -