diff --git a/tdrive/frontend/src/app/components/invitation/invitation.tsx b/tdrive/frontend/src/app/components/invitation/invitation.tsx index 2f6e62f9..138f89ff 100644 --- a/tdrive/frontend/src/app/components/invitation/invitation.tsx +++ b/tdrive/frontend/src/app/components/invitation/invitation.tsx @@ -2,15 +2,12 @@ import React, { useState } from 'react'; import { Button } from 'app/atoms/button/button'; import { Modal, ModalContent } from 'app/atoms/modal'; import { - invitationActiveTab, invitationEmailsState, invitationSentState, invitationState, } from 'app/features/invitation/state/invitation'; import { useCurrentWorkspace } from 'app/features/workspaces/hooks/use-workspaces'; -import Tab from 'app/molecules/tabs'; import { useRecoilState } from 'recoil'; -import Bulk_invitation from './parts/bulk-invitation'; import Custom_role_invitation from './parts/custom-role-invitation'; import InvitationChannels from './parts/invitation-channels'; import InvitationSent from './parts/invitation-sent'; @@ -21,14 +18,8 @@ import InvitationTarget from './parts/invitation-target'; import AllowAnyoneByEmail from './parts/allow-anyone-by-email'; import { Info, Subtitle } from 'app/atoms/text'; -enum InvitationTabs { - custom = 0, - bulk = 1, -} - export default (): React.ReactElement => { const [isOpen, setOpen] = useRecoilState(invitationState); - const [activeTab, setInvitationTab] = useRecoilState(invitationActiveTab); const [invitations] = useRecoilState(invitationEmailsState); const workspace = useCurrentWorkspace(); const [isInvitationSent] = useRecoilState(invitationSentState); diff --git a/tdrive/frontend/src/app/components/invitation/parts/invitation-input-list.tsx b/tdrive/frontend/src/app/components/invitation/parts/invitation-input-list.tsx index a495b5a4..a33a1d83 100644 --- a/tdrive/frontend/src/app/components/invitation/parts/invitation-input-list.tsx +++ b/tdrive/frontend/src/app/components/invitation/parts/invitation-input-list.tsx @@ -10,7 +10,6 @@ import { import React, { useState } from 'react'; import { useRecoilState } from 'recoil'; import PerfectScrollbar from 'react-perfect-scrollbar'; -import { useCurrentUser } from 'app/features/users/hooks/use-current-user'; import { useInvitationUsers } from 'app/features/invitation/hooks/use-invitation-users'; import ReachedLimit from './reached-limit'; import Languages from 'app/features/global/services/languages-service'; @@ -22,9 +21,7 @@ export default (): React.ReactElement => { const [currentInput, setCurrentInput] = useState(''); const [notValidEmail, setNotValidEmail] = useState(false); const [invitationTargetType] = useRecoilState(invitationTypeState); - const { user } = useCurrentUser(); const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - const currentUserEmailDomain = user?.email.split('@').pop(); const { can_add_invitations, members_limit_reached, allowed_members, allowed_guests } = useInvitationUsers(); diff --git a/tdrive/frontend/src/app/components/invitation/parts/workspace-link.tsx b/tdrive/frontend/src/app/components/invitation/parts/workspace-link.tsx index 6ced3624..6fa94f1d 100644 --- a/tdrive/frontend/src/app/components/invitation/parts/workspace-link.tsx +++ b/tdrive/frontend/src/app/components/invitation/parts/workspace-link.tsx @@ -1,10 +1,8 @@ import { Button } from 'app/atoms/button/button'; import React, { useState } from 'react'; import { CopyIcon } from '@atoms/icons-agnostic'; -import { Base } from 'app/atoms/text'; import { useInvitation } from 'app/features/invitation/hooks/use-invitation'; import Languages from 'app/features/global/services/languages-service'; -import MagicLinks from 'app/views/client/popup/AddUser/MagicLinks'; import { Input } from 'app/atoms/input/input-text'; import { InputDecorationIcon } from 'app/atoms/input/input-decoration-icon'; import { LinkIcon } from '@heroicons/react/outline'; diff --git a/tdrive/frontend/src/app/components/search-popup/search-input.tsx b/tdrive/frontend/src/app/components/search-popup/search-input.tsx index 8b925982..f8f5352b 100755 --- a/tdrive/frontend/src/app/components/search-popup/search-input.tsx +++ b/tdrive/frontend/src/app/components/search-popup/search-input.tsx @@ -1,11 +1,8 @@ import { InputDecorationIcon } from '@atoms/input/input-decoration-icon'; import { SearchIcon } from '@heroicons/react/solid'; -import { Select } from 'app/atoms/input/input-select'; import { Input } from 'app/atoms/input/input-text'; import { Loader } from 'app/atoms/loader'; import Languages from 'app/features/global/services/languages-service'; -import useRouterChannel from 'app/features/router/hooks/use-router-channel'; -import useRouterWorkspace from 'app/features/router/hooks/use-router-workspace'; import { useSearchChannelsLoading } from 'app/features/search/hooks/use-search-channels'; import { useSearchMessagesFilesLoading, @@ -20,8 +17,6 @@ import { useRecoilState } from 'recoil'; export const SearchInput = () => { const [input, setInput] = useRecoilState(SearchInputState); - const workspaceId = useRouterWorkspace(); - const channelId = useRouterChannel(); const inputElement = useRef(null); useEffect(() => { diff --git a/tdrive/frontend/src/app/components/search-popup/search-tabs.tsx b/tdrive/frontend/src/app/components/search-popup/search-tabs.tsx index 46b98098..e113a262 100755 --- a/tdrive/frontend/src/app/components/search-popup/search-tabs.tsx +++ b/tdrive/frontend/src/app/components/search-popup/search-tabs.tsx @@ -1,7 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { SearchInputState } from 'app/features/search/state/search-input'; import PerfectScrollbar from 'react-perfect-scrollbar'; -import { useRecoilValue } from 'recoil'; import SearchResulsDriveItems from './tabs/drive'; export const SearchResultsIndex = () => { @@ -18,12 +16,3 @@ export const SearchResultsIndex = () => { ); }; - -const SearchCounterBadge = (props: { count: number }) => { - const count = props.count < 100 ? props.count : '99+'; - return ( -
- {count} -
- ); -}; diff --git a/tdrive/frontend/src/app/deprecated/user/NotificationPreferences.ts b/tdrive/frontend/src/app/deprecated/user/NotificationPreferences.ts index 8656472e..f90dc026 100644 --- a/tdrive/frontend/src/app/deprecated/user/NotificationPreferences.ts +++ b/tdrive/frontend/src/app/deprecated/user/NotificationPreferences.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import moment from 'moment'; import Observable from 'app/deprecated/Observable/Observable'; import Languages from 'app/features/global/services/languages-service'; diff --git a/tdrive/frontend/src/app/features/applications/state/company-applications.ts b/tdrive/frontend/src/app/features/applications/state/company-applications.ts index 86574fb2..b345c385 100644 --- a/tdrive/frontend/src/app/features/applications/state/company-applications.ts +++ b/tdrive/frontend/src/app/features/applications/state/company-applications.ts @@ -1,13 +1,9 @@ import { atomFamily, selectorFamily } from 'recoil'; import { Application } from 'app/features/applications/types/application'; -import Logger from 'app/features/global/framework/logger-service'; -import CompanyApplicationsAPIClient from 'app/features/applications/api/company-applications-api-client'; import Collections from 'app/deprecated/CollectionsV1/Collections/Collections'; import _ from 'lodash'; -const logger = Logger.getLogger('CurrentCompanyApplicationsState'); - //Retro compatibility const companyApplicationMap: Map = new Map(); const companyApplicationsMap: Map = new Map(); @@ -36,5 +32,5 @@ export const CompanyApplicationsStateFamily = atomFamily( export const fetchCompanyApplications = selectorFamily({ key: 'fetchCompanyApplications', - get: companyId => () => [], + get: () => () => [], }); diff --git a/tdrive/frontend/src/app/features/drive/hooks/use-drive-item.tsx b/tdrive/frontend/src/app/features/drive/hooks/use-drive-item.tsx index f63eb7ff..c10c28fe 100644 --- a/tdrive/frontend/src/app/features/drive/hooks/use-drive-item.tsx +++ b/tdrive/frontend/src/app/features/drive/hooks/use-drive-item.tsx @@ -1,7 +1,7 @@ import { ToasterService } from 'app/features/global/services/toaster-service'; import { LoadingStateInitTrue } from 'app/features/global/state/atoms/Loading'; import useRouterCompany from 'app/features/router/hooks/use-router-company'; -import { useCallback, useRef } from 'react'; +import { useCallback } from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; import { DriveItemAtom, DriveItemChildrenAtom } from '../state/store'; import { DriveItem } from '../types'; diff --git a/tdrive/frontend/src/app/views/client/body/drive/browser.tsx b/tdrive/frontend/src/app/views/client/body/drive/browser.tsx index 82c309fe..04181b56 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/browser.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/browser.tsx @@ -1,4 +1,4 @@ -import { ChevronDownIcon, PlusIcon } from '@heroicons/react/outline'; +import { ChevronDownIcon } from '@heroicons/react/outline'; import { Button } from 'app/atoms/button/button'; import { Base, BaseSmall, Subtitle, Title } from 'app/atoms/text'; import Menu from 'app/components/menus/menu'; diff --git a/tdrive/frontend/src/app/views/client/body/drive/drive-item.tsx b/tdrive/frontend/src/app/views/client/body/drive/drive-item.tsx index d585cf62..3e4fbdb6 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/drive-item.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/drive-item.tsx @@ -8,7 +8,7 @@ export const DriveItem = ({ className, onClick }: { className?: string; onClick: 'rounded-md bg-zinc-500 bg-opacity-10 w-64 m-1 inline-flex flex-row items-center px-4 py-3 cursor-pointer hover:bg-zinc-500 hover:bg-opacity-25 ' + (className || '') } - onClick={e => { + onClick={() => { onClick(); }} > diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/confirm-delete/index.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/confirm-delete/index.tsx index 6b55367b..92bd1486 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/confirm-delete/index.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/confirm-delete/index.tsx @@ -6,7 +6,7 @@ import { useDriveItem } from 'app/features/drive/hooks/use-drive-item'; import { DriveItemSelectedList } from 'app/features/drive/state/store'; import { DriveItem } from 'app/features/drive/types'; import { useEffect, useState } from 'react'; -import { atom, useRecoilState, useSetRecoilState } from 'recoil'; +import { atom, useRecoilState } from 'recoil'; export type ConfirmDeleteModalType = { open: boolean; diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/create/create-folder.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/create/create-folder.tsx index a57ea3e1..949730d8 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/create/create-folder.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/create/create-folder.tsx @@ -8,7 +8,7 @@ import { CreateModalAtom } from '.'; export const CreateFolder = () => { const [name, setName] = useState(''); - const [loading, setLoading] = useState(false); + const [loading, _] = useState(false); const [state, setState] = useRecoilState(CreateModalAtom); const { create } = useDriveActions(); @@ -20,7 +20,7 @@ export const CreateFolder = () => { disabled={loading} placeholder="Folder name" className="w-full mt-4" - onChange={e => setName(e.target.value)} + onChange={(e:any) => setName(e.target.value)} />