diff --git a/backend/src/config/mailer.config.ts b/backend/src/config/mailer.config.ts index cd24c1d9..e372c694 100644 --- a/backend/src/config/mailer.config.ts +++ b/backend/src/config/mailer.config.ts @@ -5,7 +5,7 @@ export class MailerConfig implements MailerOptionsFactory { /* eslint-disable-next-line class-methods-use-this */ createMailerOptions(): MailerOptions | Promise { const transportUrl = process.env.TRANSPORT_MAILER_URL; - const emailFrom = process.env.EMAIL_FROM ?? 'runit@localhost' + const emailFrom = process.env.EMAIL_FROM ?? 'runit@localhost'; const options: MailerOptions = { transport: transportUrl, defaults: { diff --git a/frontend/src/components/Forms/AvatarChangeForm.jsx b/frontend/src/components/Forms/AvatarChangeForm.jsx index 3871f6ed..a36b075f 100644 --- a/frontend/src/components/Forms/AvatarChangeForm.jsx +++ b/frontend/src/components/Forms/AvatarChangeForm.jsx @@ -13,10 +13,6 @@ function AvatarChangeForm() { const dispatch = useDispatch(); const username = useSelector((state) => state.user.userInfo.username); - const handleInDevelopment = () => { - dispatch(modalActions.openModal({ type: 'inDevelopment' })); - }; - const handleEditAvatar = (type) => () => { dispatch(modalActions.openModal(type)); }; diff --git a/frontend/src/components/Modals/ChangeAvatar.jsx b/frontend/src/components/Modals/ChangeAvatar.jsx index f8ce3c0b..9d3c5a23 100644 --- a/frontend/src/components/Modals/ChangeAvatar.jsx +++ b/frontend/src/components/Modals/ChangeAvatar.jsx @@ -1,11 +1,9 @@ import { Button, Modal, FormControl, FormLabel, Form } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; -import { useDispatch } from 'react-redux'; import { useRef, useState } from 'react'; import AvatarEditor from 'react-avatar-editor'; function ChangeAvatar({ handleClose, isOpen }) { - const dispatch = useDispatch(); const { t } = useTranslation(); const [avatarState, setAvatarState] = useState({ scale: 1, diff --git a/frontend/src/components/Modals/NewSnippet.jsx b/frontend/src/components/Modals/NewSnippet.jsx index 7e9eafbf..c88e0f09 100644 --- a/frontend/src/components/Modals/NewSnippet.jsx +++ b/frontend/src/components/Modals/NewSnippet.jsx @@ -29,12 +29,6 @@ const icons = new Map() .set('python', PythonIcon) .set('php', PhpIcon); -const extensions = new Map() - .set('javascript', 'js') - .set('python', 'py') - .set('php', 'php') - .set('html', 'html'); - const generateGuestUserData = () => { const username = `guest_${faker.string.alphanumeric(5)}`; const email = `${username}@hexlet.com`; diff --git a/frontend/src/components/Modals/RemoveAvatar.jsx b/frontend/src/components/Modals/RemoveAvatar.jsx index b038abb5..106b624e 100644 --- a/frontend/src/components/Modals/RemoveAvatar.jsx +++ b/frontend/src/components/Modals/RemoveAvatar.jsx @@ -1,9 +1,7 @@ import { Button, Modal, FormGroup } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; -import { useDispatch } from 'react-redux'; function RemoveAvatar({ handleClose, isOpen }) { - const dispatch = useDispatch(); const { t } = useTranslation(); return ( diff --git a/frontend/src/components/Navigation/UserMenu.jsx b/frontend/src/components/Navigation/UserMenu.jsx index ef2b04ba..a01810f4 100644 --- a/frontend/src/components/Navigation/UserMenu.jsx +++ b/frontend/src/components/Navigation/UserMenu.jsx @@ -17,9 +17,6 @@ function UserMenu() { const dispatch = useDispatch(); const username = useSelector((state) => state.user.userInfo.username); - const handleInDevelopment = () => { - dispatch(actions.openModal({ type: 'inDevelopment' })); - }; const handleNewSnippet = () => { dispatch(actions.openModal({ type: 'newSnippet' })); };