Merge pull request #120 from lbryio/invite-channel-endpoint
call publish endpoint with selected channel on invites page
This commit is contained in:
commit
f06252d397
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ import RewardCard from 'component/rewardCard';
|
||||||
import RewardEnrolment from 'component/rewardEnrolment';
|
import RewardEnrolment from 'component/rewardEnrolment';
|
||||||
import UriBar from 'component/uriBar';
|
import UriBar from 'component/uriBar';
|
||||||
import invitesStyle from 'styles/invites';
|
import invitesStyle from 'styles/invites';
|
||||||
|
import { logPublish } from 'utils/helper';
|
||||||
|
|
||||||
class InvitesPage extends React.PureComponent {
|
class InvitesPage extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
|
@ -62,6 +63,7 @@ class InvitesPage extends React.PureComponent {
|
||||||
const filtered = channels.filter(c => c.name === channelName);
|
const filtered = channels.filter(c => c.name === channelName);
|
||||||
if (filtered.length > 0) {
|
if (filtered.length > 0) {
|
||||||
const channel = filtered[0];
|
const channel = filtered[0];
|
||||||
|
logPublish(channel);
|
||||||
this.setState({ channelName, inviteLink: this.getLinkForChannel(channel) });
|
this.setState({ channelName, inviteLink: this.getLinkForChannel(channel) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,6 +99,7 @@ class InvitesPage extends React.PureComponent {
|
||||||
|
|
||||||
if (!this.state.channelName && channels && channels.length > 0) {
|
if (!this.state.channelName && channels && channels.length > 0) {
|
||||||
const firstChannel = channels[0];
|
const firstChannel = channels[0];
|
||||||
|
logPublish(firstChannel);
|
||||||
this.setState({ channelName: firstChannel.name, inviteLink: this.getLinkForChannel(firstChannel) });
|
this.setState({ channelName: firstChannel.name, inviteLink: this.getLinkForChannel(firstChannel) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue