openreplay/frontend/app/components/Client/Integrations/SlackChannelList/SlackChannelList.js
Shekar Siri 0c0dd30a73
Preferences - UI and API improvements (#654)
* fix(tracker): fix assist typings

* fix(tracker): fix assist typings

* change(ui) - preferences - removed old

* change(ui) - preferences - wip

* change(ui) - preferences - list

* change(ui) - right box mardings

* change(ui) - preferences - integration item paddings

* change(ui) - preferences - integration icons

* change(ui) - preferences - integration icons

* change(ui) - preferences - integration - check status

* change(ui) - preferences - integration - check status

* change(ui) - preferences - metadata - move the delete button inside the modal

* change(ui) - preferences - webhooks - modal and delete btn changes

* change(ui) - preferences - modalContext updates

* change(ui) - input field forward refs

* change(ui) - metadata - modal

* change(ui) - metadata - set deleting item to null

* change(ui) - integrations

* change(ui) - hoc withcopy

* change(ui) - projects

* change(ui) - users list modal

* change(ui) - projects remove border for the last

* change(ui) - integrations new api changes

* change(ui) - github and jira changes

* change(ui) - github and jira changes

Co-authored-by: sylenien <nikita@openreplay.com>
2022-08-04 12:21:25 +02:00

47 lines
1.7 KiB
JavaScript

import React from 'react';
import { connect } from 'react-redux';
import { NoContent } from 'UI';
import { remove, edit, init } from 'Duck/integrations/slack';
import DocLink from 'Shared/DocLink/DocLink';
function SlackChannelList(props) {
const { list } = props;
const onEdit = (instance) => {
props.edit(instance);
props.onEdit();
};
return (
<div className="mt-6">
<NoContent
title={
<div className="p-5 mb-4">
<div className="text-base text-left">
Integrate Slack with OpenReplay and share insights with the rest of the team, directly from the recording page.
</div>
<DocLink className="mt-4 text-base" label="Integrate Slack" url="https://docs.openreplay.com/integrations/slack" />
</div>
}
size="small"
show={list.size === 0}
>
{list.map((c) => (
<div key={c.webhookId} className="border-t px-5 py-2 flex items-center justify-between cursor-pointer" onClick={() => onEdit(c)}>
<div className="flex-grow-0" style={{ maxWidth: '90%' }}>
<div>{c.name}</div>
<div className="truncate test-xs color-gray-medium">{c.endpoint}</div>
</div>
</div>
))}
</NoContent>
</div>
);
}
export default connect(
(state) => ({
list: state.getIn(['slack', 'list']),
}),
{ remove, edit, init }
)(SlackChannelList);