Render channel list dynamically based on channel activity (#80)

* render channel list dynamically based on channel activity

* rename slack message markdown transformer

* add hashtag before rendered channel names

* tune styles and add secondary channel listing

* remove emoji-dictionary
This commit is contained in:
Riku Rouvila
2020-10-02 12:59:39 +03:00
committed by GitHub
parent 0eba06f861
commit 3dce6e19b1
6 changed files with 442 additions and 91 deletions

View File

@@ -0,0 +1,17 @@
export const ChannelReferenceRenderer = (props: { value: string }) => {
return (
<>
{props.value.split(/(<#[A-Z0-9]+\|[A-Za-z0-9]+>)/).map((str) => {
const matches = str.match(/<#([A-Z0-9]+)\|([A-Za-z0-9]+)>/);
if (matches) {
return (
<a href={`https://app.slack.com/client/T03BQ3NU9/${matches[1]}`}>
#{matches[2]}
</a>
);
}
return str;
})}
</>
);
};