From 20799fd8f208da00d0116b2d229ee5b6fb64f9b8 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 30 Oct 2020 11:16:57 +1000 Subject: [PATCH 1/3] Sidebar: do not crash on lastUpdated sorting --- .../views/landscape/components/Sidebar/SidebarList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx index e95612374..56ef356f7 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarList.tsx @@ -20,11 +20,11 @@ function sidebarSort( const lastUpdated = (a: string, b: string) => { const aAssoc = associations[a]; const bAssoc = associations[b]; - const aModule = aAssoc?.metadata?.module || aAssoc?.["app-name"]; - const bModule = bAssoc?.metadata?.module || bAssoc?.["app-name"]; + const aAppName = aAssoc?.["app-name"]; + const bAppName = bAssoc?.["app-name"]; - const aUpdated = apps[aModule].lastUpdated(a); - const bUpdated = apps[bModule].lastUpdated(b); + const aUpdated = apps[aAppName].lastUpdated(a); + const bUpdated = apps[bAppName].lastUpdated(b); return bUpdated - aUpdated || alphabetical(a, b); }; From 31bc17005ccc79e922d7de3dc37e7cc01d3fec02 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Thu, 29 Oct 2020 21:21:58 -0400 Subject: [PATCH 2/3] groups: filter contacts invites from sidebar --- .../src/views/landscape/components/Sidebar/Sidebar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx index 65c2c3fd9..6205658d7 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/Sidebar.tsx @@ -58,7 +58,7 @@ const SidebarStickySpacer = styled(Box)` const inviteItems = (invites, api) => { const returned = []; Object.keys(invites).filter((e) => { - return e !== '/contacts'; + return e !== 'contacts'; }).map((appKey) => { const app = invites[appKey]; Object.keys(app).map((uid) => { @@ -122,12 +122,12 @@ export function Sidebar(props: SidebarProps) { workspace={props.workspace} /> {sidebarInvites} Date: Fri, 30 Oct 2020 11:23:00 +1000 Subject: [PATCH 3/3] CommentItem: pass date correctly --- pkg/interface/src/views/apps/publish/components/CommentItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/publish/components/CommentItem.tsx b/pkg/interface/src/views/apps/publish/components/CommentItem.tsx index fbc52236a..289eb18d9 100644 --- a/pkg/interface/src/views/apps/publish/components/CommentItem.tsx +++ b/pkg/interface/src/views/apps/publish/components/CommentItem.tsx @@ -48,7 +48,7 @@ export function CommentItem(props: CommentItemProps) { showImage contacts={contacts} ship={commentData?.author} - date={commentData["date-created"]} + date={commentData?.["time-sent"]} hideAvatars={props.hideAvatars} hideNicknames={props.hideNicknames} >