Merge pull request #3810 from urbit/mp/launch/filter-deleted-groups

launch: filter out metadata for deleted groups
This commit is contained in:
matildepark 2020-10-27 21:00:00 -04:00 committed by GitHub
commit 6e71811053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -76,7 +76,11 @@ export default class LaunchApp extends React.Component {
weather={props.weather}
/>
</Box>
<Groups associations={props.associations} invites={props.invites} api={props.api} />
<Groups
associations={props.associations}
groups={props.groups}
invites={props.invites}
api={props.api} />
</Box>
<Box
position="absolute"

View File

@ -1,8 +1,6 @@
import React from "react";
import { Box, Text } from "@tlon/indigo-react";
import { Link } from "react-router-dom";
import { useLocalStorageState } from "~/logic/lib/useLocalStorageState";
import { Associations, Association } from "~/types";
import { alphabeticalOrder } from "~/logic/lib/util";
import Tile from '../components/tiles/tile';
@ -23,6 +21,7 @@ export default function Groups(props: GroupsProps & Parameters<typeof Box>[0]) {
}
const groups = Object.values(associations?.contacts || {})
.filter(e => e['group-path'] in props.groups)
.sort(sortGroupsAlph);
const acceptInvite = (invite) => {