🧹 Removing unused imports (frontend)
🧹 Removing unused imports (frontend)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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<string>('');
|
||||
const [notValidEmail, setNotValidEmail] = useState<boolean>(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();
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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<HTMLInputElement>(null);
|
||||
useEffect(() => {
|
||||
|
||||
@@ -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 (
|
||||
<div className="bg-zinc-200 ml-2 px-1.5 text-sm rounded-full text-zinc-500 dark:bg-zing-800 dark:text-zinc-600">
|
||||
{count}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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<string, Application> = new Map();
|
||||
const companyApplicationsMap: Map<string, Application[]> = new Map();
|
||||
@@ -36,5 +32,5 @@ export const CompanyApplicationsStateFamily = atomFamily<Application[], string>(
|
||||
|
||||
export const fetchCompanyApplications = selectorFamily<Application[], string>({
|
||||
key: 'fetchCompanyApplications',
|
||||
get: companyId => () => [],
|
||||
get: () => () => [],
|
||||
});
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CreateModalAtom } from '.';
|
||||
|
||||
export const CreateFolder = () => {
|
||||
const [name, setName] = useState<string>('');
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [loading, _] = useState<boolean>(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)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
import { Layout } from 'antd';
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
|
||||
import AccountStatusComponent from 'app/components/on-boarding/account-status-component';
|
||||
|
||||
+1
-2
@@ -16,11 +16,10 @@ import FeatureTogglesService, {
|
||||
import { useCurrentCompany } from 'app/features/companies/hooks/use-companies';
|
||||
|
||||
import './Pages.scss';
|
||||
import { useRecoilState, useSetRecoilState } from 'recoil';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { invitationState } from 'app/features/invitation/state/invitation';
|
||||
import { useInvitationUsers } from 'app/features/invitation/hooks/use-invitation-users';
|
||||
import AccessRightsService from 'app/features/workspace-members/services/workspace-members-access-rights-service';
|
||||
import { useCurrentWorkspace } from 'app/features/workspaces/hooks/use-workspaces';
|
||||
import useRouterWorkspace from 'app/features/router/hooks/use-router-workspace';
|
||||
|
||||
type PropsType = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button } from '@atoms/button/button';
|
||||
import { PlusIcon, TruckIcon, UploadIcon, XIcon } from '@heroicons/react/outline';
|
||||
import { PlusIcon, TruckIcon, UploadIcon } from '@heroicons/react/outline';
|
||||
import { useCallback, useRef } from 'react';
|
||||
import { useRecoilState, useSetRecoilState } from 'recoil';
|
||||
import { AnimatedHeight } from '../../../atoms/animated-height';
|
||||
@@ -14,7 +14,7 @@ import { CreateModal, CreateModalAtom } from '../body/drive/modals/create';
|
||||
|
||||
export default () => {
|
||||
const companyId = useRouterCompany();
|
||||
const [parentId, _setParentId] = useRecoilState(DriveCurrentFolderAtom('root'));
|
||||
const [parentId, _] = useRecoilState(DriveCurrentFolderAtom('root'));
|
||||
const { access, item, inTrash } = useDriveItem(parentId);
|
||||
const { children: trashChildren } = useDriveItem('trash');
|
||||
const uploadZoneRef = useRef<UploadZone | null>(null);
|
||||
|
||||
@@ -4,10 +4,8 @@ import {
|
||||
CloudIcon,
|
||||
ExternalLinkIcon,
|
||||
HeartIcon,
|
||||
PlusIcon,
|
||||
ShareIcon,
|
||||
TrashIcon,
|
||||
UploadIcon,
|
||||
} from '@heroicons/react/outline';
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { Title } from '../../../atoms/text';
|
||||
|
||||
@@ -10,7 +10,7 @@ import Languages from 'app/features/global/services/languages-service';
|
||||
import MenuManager from 'components/menus/menus-manager';
|
||||
import { useEditors } from './editors-service';
|
||||
|
||||
export default (props: {}) => {
|
||||
export default () => {
|
||||
const { status } = useDrivePreview();
|
||||
const extension = status?.item?.name?.split('.').pop();
|
||||
const { candidates, openFile } = useEditors(extension || '');
|
||||
|
||||
Reference in New Issue
Block a user