From 672573b48f4e77c7bea6b0051666d8db681ec3ba Mon Sep 17 00:00:00 2001 From: James Acklin Date: Fri, 9 Feb 2024 13:24:02 -0500 Subject: [PATCH 1/2] groups: eliminate discover/find interface Fixes LAND-1197 --- ui/src/app.tsx | 16 ---- ui/src/components/Sidebar/MobileSidebar.tsx | 15 ---- ui/src/components/Sidebar/Sidebar.tsx | 9 +-- ui/src/nav/MobileRoot.tsx | 84 ++++++++++----------- 4 files changed, 39 insertions(+), 85 deletions(-) diff --git a/ui/src/app.tsx b/ui/src/app.tsx index 4eee186282..c4ae0e1eb6 100644 --- a/ui/src/app.tsx +++ b/ui/src/app.tsx @@ -23,7 +23,6 @@ import useMedia, { useIsDark, useIsMobile } from '@/logic/useMedia'; import useErrorHandler from '@/logic/useErrorHandler'; import { useAnalyticsId, - useCalm, useLogActivity, useSettingsLoaded, useTheme, @@ -42,7 +41,6 @@ import GroupInfo from '@/groups/GroupAdmin/GroupInfo'; import ProfileModal from '@/profiles/ProfileModal'; import MultiDMEditModal from '@/dms/MultiDMEditModal'; import NewChannelModal from '@/channels/NewChannel/NewChannelModal'; -import FindGroups from '@/groups/FindGroups'; import GroupPreviewModal from '@/groups/Join/GroupPreview'; import RejectConfirmModal from '@/groups/Join/RejectConfirmModal'; import EditProfile from '@/profiles/EditProfile/EditProfile'; @@ -257,20 +255,6 @@ function GroupsRoutes({ state, location, isMobile, isSmall }: RoutesProps) { /> )} - {/* Find by Invite URL */} - } - /> - {/* Find by Nickname or @p */} - } - /> - } - /> } diff --git a/ui/src/components/Sidebar/MobileSidebar.tsx b/ui/src/components/Sidebar/MobileSidebar.tsx index 52c1725e01..8a1ef8d1a6 100644 --- a/ui/src/components/Sidebar/MobileSidebar.tsx +++ b/ui/src/components/Sidebar/MobileSidebar.tsx @@ -16,7 +16,6 @@ import BellIcon from '../icons/BellIcon'; import HomeIconMobileNav from '../icons/HomeIconMobileNav'; import MessagesIcon from '../icons/MessagesIcon'; import Avatar from '../Avatar'; -import NavigateIcon from '../icons/NavigateIcon'; function GroupsTab(props: { isInactive: boolean; isDarkMode: boolean }) { const navigate = useNavigate(); @@ -182,20 +181,6 @@ export default function MobileSidebar() { isInactive={isInactive('/notifications')} isDarkMode={isDarkMode} /> - -
-
- -
-
- {needsUpdate ? ( {newGroupsDisplay}
)} - - {!sortedGroups.length && !hasNewGroups && !isLoading && ( -
- Check out Discover above to find new - groups in your network or view group invites. -
- )}
)} diff --git a/ui/src/nav/MobileRoot.tsx b/ui/src/nav/MobileRoot.tsx index 4726ff8ff5..9822871af1 100644 --- a/ui/src/nav/MobileRoot.tsx +++ b/ui/src/nav/MobileRoot.tsx @@ -35,7 +35,7 @@ export default function MobileRoot() { const loadingGroups = useLoadingGroups(); const newGroups = useNewGroups(); const gangsWithClaims = useGangsWithClaim(); - const { data: groups, isLoading } = useGroupsWithQuery(); + const { data: groups } = useGroupsWithQuery(); const sortedGroups = sortGroups(groups); const pinnedGroupsOptions = useMemo( () => @@ -84,56 +84,48 @@ export default function MobileRoot() { From 90bbc7111cfde61996f3860d814ec645ba21ddc2 Mon Sep 17 00:00:00 2001 From: James Acklin Date: Fri, 9 Feb 2024 13:41:11 -0500 Subject: [PATCH 2/2] groups: remove unused import --- ui/src/nav/MobileRoot.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/src/nav/MobileRoot.tsx b/ui/src/nav/MobileRoot.tsx index 9822871af1..e80343860b 100644 --- a/ui/src/nav/MobileRoot.tsx +++ b/ui/src/nav/MobileRoot.tsx @@ -19,7 +19,6 @@ import MobileHeader from '@/components/MobileHeader'; import Layout from '@/components/Layout/Layout'; import AddIconMobileNav from '@/components/icons/AddIconMobileNav'; import GroupJoinList from '@/groups/GroupJoinList'; -import NavigateIcon from '@/components/icons/NavigateIcon'; import WelcomeCard from '@/components/WelcomeCard'; import AddGroupSheet from '@/groups/AddGroupSheet';