mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
Merge branch 'lf/fix-last-updated' (#3840)
* origin/lf/fix-last-updated: CommentItem: pass date correctly groups: filter contacts invites from sidebar Sidebar: do not crash on lastUpdated sorting Signed-off-by: Matilde Park <matilde.park@gmail.com>
This commit is contained in:
commit
36a27ebe70
@ -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}
|
||||
>
|
||||
|
@ -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}
|
||||
/>
|
||||
<SidebarListHeader
|
||||
contacts={props.contacts}
|
||||
contacts={props.contacts}
|
||||
baseUrl={props.baseUrl}
|
||||
groups={props.groups}
|
||||
initialValues={config}
|
||||
handleSubmit={setConfig}
|
||||
selected={selected || ""}
|
||||
selected={selected || ""}
|
||||
workspace={workspace} />
|
||||
{sidebarInvites}
|
||||
<SidebarList
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user