Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Apr 8, 2022
1 parent 2a0c6a8 commit e16d643
Show file tree
Hide file tree
Showing 3 changed files with 5,012 additions and 5,008 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const AddCustomSound = function AddCustomSound({ goToNew, close, onChange, ...pr

const reader = new FileReader();
reader.readAsBinaryString(soundFile);
reader.onloadend = () => {
reader.onloadend = (): void => {
try {
uploadCustomSound(reader.result, soundFile.type, {
...soundData,
Expand Down Expand Up @@ -90,7 +90,11 @@ const AddCustomSound = function AddCustomSound({ goToNew, close, onChange, ...pr
<Field>
<Field.Label>{t('Name')}</Field.Label>
<Field.Row>
<TextInput value={name} onChange={(e: FormEvent<HTMLInputElement>) => setName(e.currentTarget.value)} placeholder={t('Name')} />
<TextInput
value={name}
onChange={(e: FormEvent<HTMLInputElement>): void => setName(e.currentTarget.value)}
placeholder={t('Name')}
/>
</Field.Row>
</Field>
<Field>
Expand Down
19 changes: 9 additions & 10 deletions apps/meteor/client/views/admin/customSounds/AdminSoundsRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
import { Box, Button, Icon, Pagination } from '@rocket.chat/fuselage';
import { useDebouncedValue } from '@rocket.chat/fuselage-hooks';
import React, { useMemo, useState, useCallback } from 'react';
import React, { useMemo, useState, useCallback, ReactElement } from 'react';

import FilterByText from '../../../components/FilterByText';
import { GenericTable } from '../../../components/GenericTable/V2/GenericTable';
import { GenericTableBody } from '../../../components/GenericTable/V2/GenericTableBody';
import { GenericTableCell } from '../../../components/GenericTable/V2/GenericTableCell';
import { GenericTableHeader } from '../../../components/GenericTable/V2/GenericTableHeader';
import { GenericTableHeaderCell } from '../../../components/GenericTable/V2/GenericTableHeaderCell';
import { GenericTableBody } from '../../../components/GenericTable/V2/GenericTableBody';
import { GenericTableLoadingTable } from '../../../components/GenericTable/V2/GenericTableLoadingTable';
import { GenericTableRow } from '../../../components/GenericTable/V2/GenericTableRow';
import { GenericTableCell } from '../../../components/GenericTable/V2/GenericTableCell';
import { useCustomSound } from '../../../contexts/CustomSoundContext';
import { usePagination } from '../../../components/GenericTable/hooks/usePagination';
import { useSort } from '../../../components/GenericTable/hooks/useSort';
import Page from '../../../components/Page';
import VerticalBar from '../../../components/VerticalBar';
import { usePermission } from '../../../contexts/AuthorizationContext';
import { useCustomSound } from '../../../contexts/CustomSoundContext';
import { useRoute, useRouteParameter } from '../../../contexts/RouterContext';
import { useTranslation } from '../../../contexts/TranslationContext';
import { useEndpointData } from '../../../hooks/useEndpointData';
import { AsyncStatePhase } from '../../../lib/asyncState';
import NotAuthorizedPage from '../../notAuthorized/NotAuthorizedPage';
import AddCustomSound from './AddCustomSound';
// import AdminSounds from './AdminSounds';
import EditCustomSound from './EditCustomSound';
import { useSort } from '../../../components/GenericTable/hooks/useSort';
import FilterByText from '../../../components/FilterByText';
import { usePagination } from '../../../components/GenericTable/hooks/usePagination';

function CustomSoundsRoute() {
function CustomSoundsRoute(): ReactElement {
const route = useRoute('custom-sounds');
const context = useRouteParameter('context');
const id = useRouteParameter('id');
Expand Down Expand Up @@ -55,7 +54,7 @@ function CustomSoundsRoute() {
const { reload, ...result } = useEndpointData('custom-sounds.list', query);

const handleItemClick = useCallback(
(_id) => () => {
(_id) => (): void => {
route.push({
context: 'edit',
id: _id,
Expand Down
Loading

0 comments on commit e16d643

Please sign in to comment.