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 { getGroupFromWorkspace } from '~/logic/lib/workspace';
|
||||
import { GroupHome } from './Home/GroupHome';
|
||||
import { EmptyGroupHome } from './Home/EmptyGroupHome';
|
||||
import { Workspace } from '~/types/workspace';
|
||||
import useContactState from '~/logic/state/contact';
|
||||
import useGroupState from '~/logic/state/group';
|
||||
@ -206,11 +207,17 @@ export function GroupsPane(props: GroupsPaneProps) {
|
||||
recentGroups={recentGroups}
|
||||
baseUrl={baseUrl}
|
||||
{...props}>
|
||||
{ workspace.type === 'group' ? (
|
||||
<GroupHome
|
||||
api={api}
|
||||
baseUrl={baseUrl}
|
||||
groupPath={groupPath}
|
||||
/>
|
||||
) : (
|
||||
<EmptyGroupHome
|
||||
associations={associations}
|
||||
/>
|
||||
)}
|
||||
{popovers(routeProps, baseUrl)}
|
||||
</Skeleton>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user