Invites: fix prop passing

Fixes urbit/landscape#654
This commit is contained in:
Liam Fitzgerald 2021-03-29 10:14:58 +10:00 committed by Matilde Park
parent 185f35f194
commit 1ec9141de1
3 changed files with 10 additions and 3 deletions

View File

@ -89,6 +89,7 @@ export function Invites(props: InvitesProps): ReactElement {
invite={invite}
app={app}
uid={uid}
join={join}
resource={resource}
/>
);

View File

@ -14,6 +14,7 @@ import GroupSearch from '~/views/components/GroupSearch';
import { useTutorialModal } from '~/views/components/useTutorialModal';
import useHarkState from '~/logic/state/hark';
import useMetadataState from '~/logic/state/metadata';
import useGroupState from '~/logic/state/group';
const baseUrl = '/~notifications';
@ -41,6 +42,7 @@ export default function NotificationsScreen(props: any): ReactElement {
const [filter, setFilter] = useState<NotificationFilter>({ groups: [] });
const associations = useMetadataState(state => state.associations);
const pendingJoin = useGroupState(s => s.pendingJoin);
const onSubmit = async ({ groups } : NotificationFilter) => {
setFilter({ groups });
};
@ -128,7 +130,11 @@ export default function NotificationsScreen(props: any): ReactElement {
</Dropdown>
</Row>
</Row>
{!view && <Inbox {...props} filter={filter.groups} />}
{!view && <Inbox
pendingJoin={pendingJoin}
{...props}
filter={filter.groups}
/>}
</Col>
</Body>
</>

View File

@ -108,7 +108,7 @@ export function InviteItem(props: InviteItemProps) {
}
}, [invite]);
if(status?.hidden) {
if(pendingJoin?.hidden) {
return null;
}
@ -119,7 +119,7 @@ export function InviteItem(props: InviteItemProps) {
api={api}
preview={preview}
invite={invite}
status={status}
status={pendingJoin.progress}
{...handlers}
/>
);