Commit 02ca61f6 authored by mgabdev's avatar mgabdev

Updated chat in profile

- Chat in profile now directs to private message with user
parent 3d3b51ee
......@@ -36,6 +36,8 @@ export default class IconButton extends React.PureComponent {
};
handleClick = (e) => {
if (!this.props.onClick) return;
e.preventDefault();
if (!this.props.disabled) {
......@@ -89,6 +91,7 @@ export default class IconButton extends React.PureComponent {
style={style}
tabIndex={tabIndex}
disabled={disabled}
type={type}
>
<Icon id={icon} fixedWidth aria-hidden='true' />
</button>
......
......@@ -4,7 +4,6 @@ import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import axios from 'axios';
import Button from 'gabsocial/components/button';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { autoPlayGif, me, isStaff } from 'gabsocial/initial_state';
......@@ -94,20 +93,6 @@ class Header extends ImmutablePureComponent {
window.removeEventListener('resize', this.handleResize);
}
onChat = () => {
const { account } = this.props;
axios.post('https://chat.gab.com/private-message', {
username: account.get('username'),
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
handleResize = debounce(() => {
this.setState({ isSmallScreen: (window.innerWidth <= 895) });
}, 5, {
......@@ -343,7 +328,6 @@ class Header extends ImmutablePureComponent {
type='submit'
icon='comments'
className='button button-alternative-2 chat-button'
onClick={this.onChat}
title={intl.formatMessage(messages.chat)}
/>
</form>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment