🧹 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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user