mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +03:00
interface: prevent crash in non-group workspace
This commit is contained in:
parent
03b5946089
commit
65405f1f1a
@ -26,6 +26,7 @@ import '~/views/apps/links/css/custom.css';
|
|||||||
import '~/views/apps/publish/css/custom.css';
|
import '~/views/apps/publish/css/custom.css';
|
||||||
import { getGroupFromWorkspace } from '~/logic/lib/workspace';
|
import { getGroupFromWorkspace } from '~/logic/lib/workspace';
|
||||||
import { GroupHome } from './Home/GroupHome';
|
import { GroupHome } from './Home/GroupHome';
|
||||||
|
import { EmptyGroupHome } from './Home/EmptyGroupHome';
|
||||||
import { Workspace } from '~/types/workspace';
|
import { Workspace } from '~/types/workspace';
|
||||||
import useContactState from '~/logic/state/contact';
|
import useContactState from '~/logic/state/contact';
|
||||||
import useGroupState from '~/logic/state/group';
|
import useGroupState from '~/logic/state/group';
|
||||||
@ -206,12 +207,18 @@ export function GroupsPane(props: GroupsPaneProps) {
|
|||||||
recentGroups={recentGroups}
|
recentGroups={recentGroups}
|
||||||
baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
{...props}>
|
{...props}>
|
||||||
<GroupHome
|
{ workspace.type === 'group' ? (
|
||||||
api={api}
|
<GroupHome
|
||||||
baseUrl={baseUrl}
|
api={api}
|
||||||
groupPath={groupPath}
|
baseUrl={baseUrl}
|
||||||
/>
|
groupPath={groupPath}
|
||||||
{popovers(routeProps, baseUrl)}
|
/>
|
||||||
|
) : (
|
||||||
|
<EmptyGroupHome
|
||||||
|
associations={associations}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{popovers(routeProps, baseUrl)}
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user