[deploy] Remove unnecessary email call-to-action (#10972)
This commit is contained in:
parent
173e79bdfa
commit
f428aa85fc
9 changed files with 10 additions and 26 deletions
|
|
@ -18,7 +18,6 @@ import ChatChannelSettingsSection from './ChatChannelSettingsSection';
|
|||
|
||||
export default class ChatChannelSettings extends Component {
|
||||
static propTypes = {
|
||||
modFaqEmail: PropTypes.string.isRequired,
|
||||
handleLeavingChannel: PropTypes.func.isRequired,
|
||||
activeMembershipId: PropTypes.number.isRequired,
|
||||
};
|
||||
|
|
@ -382,8 +381,6 @@ export default class ChatChannelSettings extends Component {
|
|||
invitationLink,
|
||||
} = this.state;
|
||||
|
||||
const { modFaqEmail } = this.props;
|
||||
|
||||
if (!chatChannel) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -393,7 +390,6 @@ export default class ChatChannelSettings extends Component {
|
|||
<div className="p-4">
|
||||
{displaySettings ? (
|
||||
<ChatChannelSettingsSection
|
||||
modFaqEmail={modFaqEmail}
|
||||
channelDiscoverable={channelDiscoverable}
|
||||
updateCurrentMembershipNotificationSettings={
|
||||
this.updateCurrentMembershipNotificationSettings
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ const ChatChannelSettingsSection = ({
|
|||
activeMemberships,
|
||||
pendingMemberships,
|
||||
requestedMemberships,
|
||||
modFaqEmail,
|
||||
invitationUsernames,
|
||||
showGlobalBadgeNotification,
|
||||
}) => (
|
||||
|
|
@ -75,7 +74,6 @@ const ChatChannelSettingsSection = ({
|
|||
/>
|
||||
<ModFaqSection
|
||||
currentMembershipRole={currentMembership.role}
|
||||
email={modFaqEmail}
|
||||
className="channel-mod-faq"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -87,7 +85,6 @@ ChatChannelSettingsSection.propTypes = {
|
|||
activeMemberships: PropTypes.isRequired,
|
||||
pendingMemberships: PropTypes.isRequired,
|
||||
requestedMemberships: PropTypes.isRequired,
|
||||
modFaqEmail: PropTypes.string.isRequired,
|
||||
invitationUsernames: PropTypes.string.isRequired,
|
||||
channelDescription: PropTypes.string.isRequired,
|
||||
channelDiscoverable: PropTypes.bool.isRequired,
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ const ModFaqSection = ({ email, currentMembershipRole }) => {
|
|||
return (
|
||||
<div className="crayons-card grid gap-2 p-4 faq-section">
|
||||
<p className="contact-details">
|
||||
Questions about Connect Channel moderation? Contact
|
||||
Questions about Connect moderation?
|
||||
<a
|
||||
href={`mailto:${email}`}
|
||||
href={`/contact`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="mx-2 url-link"
|
||||
>
|
||||
{email}
|
||||
Contact site admins
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ describe('<Chat />', () => {
|
|||
it('should have no a11y violations', async () => {
|
||||
fetch.mockResponse(getMockResponse());
|
||||
const { container } = render(
|
||||
<Chat {...getRootData()} modFaqEmail="jane@doe.com" />,
|
||||
<Chat {...getRootData()} />,
|
||||
);
|
||||
const results = await axe(container);
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ describe('<Chat />', () => {
|
|||
it('should render expanded', () => {
|
||||
fetch.mockResponse(getMockResponse());
|
||||
const { getByTestId, getByText, getByLabelText, getByRole } = render(
|
||||
<Chat {...getRootData()} modFaqEmail="jane@doe.com" />,
|
||||
<Chat {...getRootData()} />,
|
||||
);
|
||||
const chat = getByTestId('chat');
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ describe('<Chat />', () => {
|
|||
it('should collapse and expand chat channels properly', async () => {
|
||||
fetch.mockResponse(getMockResponse());
|
||||
const { queryByText } = render(
|
||||
<Chat {...getRootData()} modFaqEmail="jane@doe.com" />,
|
||||
<Chat {...getRootData()} />,
|
||||
);
|
||||
|
||||
// // chat channels
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ describe('<ChatChannelSettings />', () => {
|
|||
const { container } = render(
|
||||
<ChatChannelSettings
|
||||
activeMembershipId={12}
|
||||
modFaqEmail="jane@doe.com"
|
||||
/>,
|
||||
);
|
||||
const results = await axe(container);
|
||||
|
|
@ -23,7 +22,6 @@ describe('<ChatChannelSettings />', () => {
|
|||
const { container } = render(
|
||||
<ChatChannelSettings
|
||||
activeMembershipId={12}
|
||||
modFaqEmail="jane@doe.com"
|
||||
/>,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ describe('<Content />', () => {
|
|||
const { container } = render(
|
||||
<Content
|
||||
resource={channelRequestResource}
|
||||
modFaqEmail="jane@doe.com"
|
||||
/>,
|
||||
);
|
||||
const results = await axe(container);
|
||||
|
|
@ -52,7 +51,6 @@ describe('<Content />', () => {
|
|||
const { queryByText, queryByTitle } = render(
|
||||
<Content
|
||||
resource={channelRequestResource}
|
||||
modFaqEmail="jane@doe.com"
|
||||
/>,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ const WIDE_WIDTH_LIMIT = 1600;
|
|||
|
||||
export default class Chat extends Component {
|
||||
static propTypes = {
|
||||
modFaqEmail: PropTypes.string.isRequired,
|
||||
pusherKey: PropTypes.number.isRequired,
|
||||
chatChannels: PropTypes.string.isRequired,
|
||||
chatOptions: PropTypes.string.isRequired,
|
||||
|
|
@ -1468,7 +1467,6 @@ export default class Chat extends Component {
|
|||
}
|
||||
renderActiveChatChannel = (channelHeader) => {
|
||||
const { state, props } = this;
|
||||
const { modFaqEmail } = props;
|
||||
|
||||
return (
|
||||
<div className="activechatchannel">
|
||||
|
|
@ -1533,7 +1531,6 @@ export default class Chat extends Component {
|
|||
</div>
|
||||
</div>
|
||||
<Content
|
||||
modFaqEmail={modFaqEmail}
|
||||
onTriggerContent={this.triggerActiveContent}
|
||||
resource={state.activeContent[state.activeChannelId]}
|
||||
activeChannel={state.activeChannel}
|
||||
|
|
|
|||
|
|
@ -30,14 +30,13 @@ export default class Content extends Component {
|
|||
activeMembershipId: PropTypes.func,
|
||||
sendCanvasImage: PropTypes.func,
|
||||
}).isRequired,
|
||||
modFaqEmail: PropTypes.string.isRequired,
|
||||
fullscreen: PropTypes.bool.isRequired,
|
||||
onTriggerContent: PropTypes.func.isRequired,
|
||||
updateRequestCount: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { onTriggerContent, fullscreen, resource, modFaqEmail } = this.props;
|
||||
const { onTriggerContent, fullscreen, resource } = this.props;
|
||||
if (!resource) {
|
||||
return '';
|
||||
}
|
||||
|
|
@ -81,13 +80,13 @@ export default class Content extends Component {
|
|||
'M20 3h2v6h-2V5h-4V3h4zM4 3h4v2H4v4H2V3h2zm16 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z',
|
||||
)}
|
||||
</button>
|
||||
<Display resource={resource} modFaqEmail={modFaqEmail} />
|
||||
<Display resource={resource} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const Display = ({ modFaqEmail, resource }) => {
|
||||
const Display = ({ resource }) => {
|
||||
switch (resource.type_of) {
|
||||
case 'loading-user':
|
||||
return <div className="loading-user" title="Loading user" />;
|
||||
|
|
@ -112,7 +111,6 @@ const Display = ({ modFaqEmail, resource }) => {
|
|||
case 'chat-channel-setting':
|
||||
return (
|
||||
<ChatChannelSettings
|
||||
modFaqEmail={modFaqEmail}
|
||||
resource={resource.data}
|
||||
activeMembershipId={resource.activeMembershipId}
|
||||
handleLeavingChannel={resource.handleLeavingChannel}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function loadElement() {
|
|||
|
||||
if (root) {
|
||||
render(<Snackbar lifespan="3" />, document.getElementById('snack-zone'));
|
||||
render(<Chat {...root.dataset} modFaqEmail="<%= SiteConfig.email_addresses[:default] %>" />, root);
|
||||
render(<Chat {...root.dataset} />, root);
|
||||
|
||||
const placeholder = document.getElementById('chat_placeholder');
|
||||
|
||||
Loading…
Add table
Reference in a new issue