Merge pull request #4866 from urbit/lf/fix-sidebar

interface: sidebar fix && images in markdown
This commit is contained in:
matildepark 2021-05-06 00:58:25 -04:00 committed by GitHub
commit d018057600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -346,6 +346,11 @@ const renderers = {
); );
}, },
'graph-mention': ({ ship }) => <Mention api={{} as any} ship={ship} />, 'graph-mention': ({ ship }) => <Mention api={{} as any} ship={ship} />,
'image': ({ url }) => (
<Box mt="1" mb="2" flexShrink={0}>
<RemoteContent key={url} url={url} />
</Box>
),
'graph-url': ({ url }) => ( 'graph-url': ({ url }) => (
<Box mt="1" mb="2" flexShrink={0}> <Box mt="1" mb="2" flexShrink={0}>
<RemoteContent key={url} url={url} /> <RemoteContent key={url} url={url} />

View File

@ -53,8 +53,8 @@ export function SidebarListHeader(props: {
const noun = (props.workspace?.type === 'messages') ? 'Messages' : 'Channels'; const noun = (props.workspace?.type === 'messages') ? 'Messages' : 'Channels';
let feedPath: any = null; let feedPath: any = null;
if ('group' in metadata?.config && typeof metadata.config.group === 'string') { if (metadata.config && 'group' in metadata?.config && 'resource' in metadata.config.group) {
feedPath = metadata.config.group; feedPath = metadata.config.group.resource;
} }
const unreadCount = useHarkState( const unreadCount = useHarkState(