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
|
showImage
|
||||||
contacts={contacts}
|
contacts={contacts}
|
||||||
ship={commentData?.author}
|
ship={commentData?.author}
|
||||||
date={commentData["date-created"]}
|
date={commentData?.["time-sent"]}
|
||||||
hideAvatars={props.hideAvatars}
|
hideAvatars={props.hideAvatars}
|
||||||
hideNicknames={props.hideNicknames}
|
hideNicknames={props.hideNicknames}
|
||||||
>
|
>
|
||||||
|
@ -58,7 +58,7 @@ const SidebarStickySpacer = styled(Box)`
|
|||||||
const inviteItems = (invites, api) => {
|
const inviteItems = (invites, api) => {
|
||||||
const returned = [];
|
const returned = [];
|
||||||
Object.keys(invites).filter((e) => {
|
Object.keys(invites).filter((e) => {
|
||||||
return e !== '/contacts';
|
return e !== 'contacts';
|
||||||
}).map((appKey) => {
|
}).map((appKey) => {
|
||||||
const app = invites[appKey];
|
const app = invites[appKey];
|
||||||
Object.keys(app).map((uid) => {
|
Object.keys(app).map((uid) => {
|
||||||
@ -122,12 +122,12 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
workspace={props.workspace}
|
workspace={props.workspace}
|
||||||
/>
|
/>
|
||||||
<SidebarListHeader
|
<SidebarListHeader
|
||||||
contacts={props.contacts}
|
contacts={props.contacts}
|
||||||
baseUrl={props.baseUrl}
|
baseUrl={props.baseUrl}
|
||||||
groups={props.groups}
|
groups={props.groups}
|
||||||
initialValues={config}
|
initialValues={config}
|
||||||
handleSubmit={setConfig}
|
handleSubmit={setConfig}
|
||||||
selected={selected || ""}
|
selected={selected || ""}
|
||||||
workspace={workspace} />
|
workspace={workspace} />
|
||||||
{sidebarInvites}
|
{sidebarInvites}
|
||||||
<SidebarList
|
<SidebarList
|
||||||
|
@ -20,11 +20,11 @@ function sidebarSort(
|
|||||||
const lastUpdated = (a: string, b: string) => {
|
const lastUpdated = (a: string, b: string) => {
|
||||||
const aAssoc = associations[a];
|
const aAssoc = associations[a];
|
||||||
const bAssoc = associations[b];
|
const bAssoc = associations[b];
|
||||||
const aModule = aAssoc?.metadata?.module || aAssoc?.["app-name"];
|
const aAppName = aAssoc?.["app-name"];
|
||||||
const bModule = bAssoc?.metadata?.module || bAssoc?.["app-name"];
|
const bAppName = bAssoc?.["app-name"];
|
||||||
|
|
||||||
const aUpdated = apps[aModule].lastUpdated(a);
|
const aUpdated = apps[aAppName].lastUpdated(a);
|
||||||
const bUpdated = apps[bModule].lastUpdated(b);
|
const bUpdated = apps[bAppName].lastUpdated(b);
|
||||||
|
|
||||||
return bUpdated - aUpdated || alphabetical(a, b);
|
return bUpdated - aUpdated || alphabetical(a, b);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user