diff --git a/eslint.config.mjs b/eslint.config.mjs index 94f78e8ba1..e441c76f24 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -105,6 +105,7 @@ export default [ '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }], '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-floating-promises': 'off', // TODO: Disable only for .jsx and .tsx files '@typescript-eslint/no-misused-promises': 'off', // Most of these errors come from Express route handlers that are handled correctly by express-async-errors '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', diff --git a/services/frontend/src/components/Feedback/index.jsx b/services/frontend/src/components/Feedback/index.jsx deleted file mode 100644 index 2575232670..0000000000 --- a/services/frontend/src/components/Feedback/index.jsx +++ /dev/null @@ -1,97 +0,0 @@ -import { useEffect, useState } from 'react' -import { Button, Form, Header, Icon, Message, Modal, TextArea } from 'semantic-ui-react' - -import { useTitle } from '@/common/hooks' -import { useSendFeedbackMutation } from '@/redux/feedback' - -export const Feedback = () => { - const [feedback, setFeedback] = useState('') - const [showError, setShowError] = useState(false) - const [showSuccess, setShowSuccess] = useState(false) - useTitle('Feedback') - - const [sendFeedback, { isError, isLoading, isSuccess }] = useSendFeedbackMutation() - - useEffect(() => { - if (!isSuccess) return undefined - setFeedback('') - setShowSuccess(true) - const timer = setTimeout(() => setShowSuccess(false), 10000) - return () => clearTimeout(timer) - }, [isSuccess]) - - useEffect(() => { - if (!isError) return undefined - setShowError(true) - const timer = setTimeout(() => setShowError(false), 10000) - return () => clearTimeout(timer) - }, [isError]) - - const handleTyping = ({ target }) => { - setFeedback(target.value) - } - - const handleSubmit = event => { - event.preventDefault() - sendFeedback({ content: feedback }) - } - - return ( -
- {showSuccess && ( - - - - Your message was sent -

Thank you for contacting us. We’ll get back to you soon.

-
-
- )} - {showError && ( - - - - Your message was not sent -

An error occured while trying to send your message. Please try again.

-
-
- )} -
- Give feedback - - We are constantly improving Oodikone. Please share your thoughts using the form below, or contact us at{' '} - grp-toska@helsinki.fi. -
You can write in Finnish or English.
-
-
-
-