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} invite={invite}
app={app} app={app}
uid={uid} uid={uid}
join={join}
resource={resource} resource={resource}
/> />
); );

View File

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

View File

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