From 36e5f2ccff333c2612f06bdf0f3810a34e070bbc Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 5 Aug 2020 16:12:06 +0300 Subject: [PATCH] Moved contact components under Contacts and remove from Pim. --- src/{components => Contacts}/AddressBook.tsx | 0 src/{components => Contacts}/Contact.tsx | 2 +- src/{components => Contacts}/ContactEdit.tsx | 0 src/Contacts/Main.tsx | 6 +++--- .../SearchableAddressBook.tsx | 2 +- src/Pim/index.tsx | 20 +------------------ 6 files changed, 6 insertions(+), 24 deletions(-) rename src/{components => Contacts}/AddressBook.tsx (100%) rename src/{components => Contacts}/Contact.tsx (98%) rename src/{components => Contacts}/ContactEdit.tsx (100%) rename src/{components => Contacts}/SearchableAddressBook.tsx (95%) diff --git a/src/components/AddressBook.tsx b/src/Contacts/AddressBook.tsx similarity index 100% rename from src/components/AddressBook.tsx rename to src/Contacts/AddressBook.tsx diff --git a/src/components/Contact.tsx b/src/Contacts/Contact.tsx similarity index 98% rename from src/components/Contact.tsx rename to src/Contacts/Contact.tsx index fc34ed1..15cb39e 100644 --- a/src/components/Contact.tsx +++ b/src/Contacts/Contact.tsx @@ -12,7 +12,7 @@ import CommunicationChatBubble from "@material-ui/icons/ChatBubble"; import CommunicationEmail from "@material-ui/icons/Email"; import CopyIcon from "../icons/Copy"; -import PimItemHeader from "./PimItemHeader"; +import PimItemHeader from "../components/PimItemHeader"; import { ContactType } from "../pim-types"; import { IconButton, Avatar } from "@material-ui/core"; diff --git a/src/components/ContactEdit.tsx b/src/Contacts/ContactEdit.tsx similarity index 100% rename from src/components/ContactEdit.tsx rename to src/Contacts/ContactEdit.tsx diff --git a/src/Contacts/Main.tsx b/src/Contacts/Main.tsx index adc0e61..4ed5be2 100644 --- a/src/Contacts/Main.tsx +++ b/src/Contacts/Main.tsx @@ -14,10 +14,10 @@ import { ContactType, PimType } from "../pim-types"; import { useCredentials } from "../credentials"; import { useItems, useCollections, getCollectionManager } from "../etebase-helpers"; import { routeResolver } from "../App"; -import SearchableAddressBook from "../components/SearchableAddressBook"; -import Contact from "../components/Contact"; +import SearchableAddressBook from "./SearchableAddressBook"; +import Contact from "./Contact"; import LoadingIndicator from "../widgets/LoadingIndicator"; -import ContactEdit from "../components/ContactEdit"; +import ContactEdit from "./ContactEdit"; import PageNotFound from "../PageNotFound"; import { CachedCollection, getItemNavigationUid, getDecryptCollectionsFunction, getDecryptItemsFunction } from "../Pim/helpers"; diff --git a/src/components/SearchableAddressBook.tsx b/src/Contacts/SearchableAddressBook.tsx similarity index 95% rename from src/components/SearchableAddressBook.tsx rename to src/Contacts/SearchableAddressBook.tsx index 7886c47..7938dff 100644 --- a/src/components/SearchableAddressBook.tsx +++ b/src/Contacts/SearchableAddressBook.tsx @@ -11,7 +11,7 @@ import IconClear from "@material-ui/icons/Clear"; import { ContactType } from "../pim-types"; -import AddressBook from "../components/AddressBook"; +import AddressBook from "./AddressBook"; interface PropsType { entries: ContactType[]; diff --git a/src/Pim/index.tsx b/src/Pim/index.tsx index 180a5dd..97bde3f 100644 --- a/src/Pim/index.tsx +++ b/src/Pim/index.tsx @@ -24,8 +24,6 @@ import { PimType, ContactType, EventType, TaskType } from "../pim-types"; import Container from "../widgets/Container"; import JournalEntries from "../components/JournalEntries"; -import ContactEdit from "../components/ContactEdit"; -import Contact from "../components/Contact"; import EventEdit from "../components/EventEdit"; import Event from "../components/Event"; import TaskEdit from "../components/Tasks/TaskEdit"; @@ -389,26 +387,10 @@ class Pim extends React.PureComponent { } public render() { - const { collectionsAddressBook, collectionsCalendar, collectionsTaskList, addressBookItems, calendarItems, taskListItems } = itemsSelector(this.props); + const { collectionsCalendar, collectionsTaskList, calendarItems, taskListItems } = itemsSelector(this.props); return ( - ( - - )} - /> (