interface: update GroupLink for new joining flow
@@ -22,29 +22,13 @@ export function GroupLink({
useCallback(s => resource in s.associations.groups, [resource])
);
- const { modal, showModal } = useModal({
- modal: <JoinGroup autojoin={name} />
- });
-
const { preview } = usePreview(resource);
return (
- <>
- {modal}
<Row
{...rest}
as={Link}
- to={joined ? `/~landscape/ship/${name}` : `/perma/group/${name}`}
- onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {
- e.stopPropagation();
-
- if (e.metaKey || e.ctrlKey) {
- return;
- }
-
- e.preventDefault();
- showModal();
- }}
+ to={joined ? `/~landscape/ship/${name}` : { search: `?join-kind=groups&join-path=/ship/${name}`}}
flexShrink={1}
alignItems="center"
width="100%"
@@ -77,6 +61,5 @@ export function GroupLink({
</Box>
</Col>
</Row>
- </>
);
}
