Chats: clean up some eslint errors

This commit is contained in:
Alex Gleason 2022-09-19 14:14:39 -05:00
parent 23bbaf329b
commit 6ce7c0a8cb
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 4 additions and 8 deletions

View file

@ -1,17 +1,14 @@
import { useMutation } from '@tanstack/react-query';
import React from 'react'; import React from 'react';
import { defineMessages, useIntl } from 'react-intl'; import { defineMessages, useIntl } from 'react-intl';
import { blockAccount } from 'soapbox/actions/accounts'; import { blockAccount } from 'soapbox/actions/accounts';
import { patchMeSuccess } from 'soapbox/actions/me';
import { openModal } from 'soapbox/actions/modals'; import { openModal } from 'soapbox/actions/modals';
import { initReport } from 'soapbox/actions/reports'; import { initReport } from 'soapbox/actions/reports';
import snackbar from 'soapbox/actions/snackbar';
import List, { ListItem } from 'soapbox/components/list'; import List, { ListItem } from 'soapbox/components/list';
import { Avatar, CardBody, CardHeader, CardTitle, Divider, HStack, Icon, IconButton, Menu, MenuButton, MenuItem, MenuList, Stack, Text, Toggle } from 'soapbox/components/ui'; import { Avatar, Divider, HStack, Icon, IconButton, Menu, MenuButton, MenuItem, MenuList, Stack, Text, Toggle } from 'soapbox/components/ui';
import VerificationBadge from 'soapbox/components/verification_badge'; import VerificationBadge from 'soapbox/components/verification_badge';
import { useChatContext } from 'soapbox/contexts/chat-context'; import { useChatContext } from 'soapbox/contexts/chat-context';
import { useApi, useAppDispatch, useOwnAccount } from 'soapbox/hooks'; import { useAppDispatch, useOwnAccount } from 'soapbox/hooks';
import { useChat, useChatSilence } from 'soapbox/queries/chats'; import { useChat, useChatSilence } from 'soapbox/queries/chats';
import Chat from '../../chat'; import Chat from '../../chat';
@ -34,7 +31,6 @@ const ChatPageMain = () => {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const intl = useIntl(); const intl = useIntl();
const account = useOwnAccount(); const account = useOwnAccount();
const api = useApi();
const { chat } = useChatContext(); const { chat } = useChatContext();
const { isSilenced, handleSilence } = useChatSilence(chat); const { isSilenced, handleSilence } = useChatSilence(chat);

View file

@ -28,7 +28,7 @@ describe('<ChatSearch />', () => {
}); });
describe('when the pane is open', () => { describe('when the pane is open', () => {
beforeEach(async () => { beforeEach(async() => {
renderComponent(); renderComponent();
await userEvent.click(screen.getByTestId('icon-button')); await userEvent.click(screen.getByTestId('icon-button'));
}); });
@ -50,7 +50,7 @@ describe('<ChatSearch />', () => {
}); });
}); });
it('renders accounts', async () => { it('renders accounts', async() => {
renderComponent(); renderComponent();
const user = userEvent.setup(); const user = userEvent.setup();