Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
lbry-react-native
Commits
81bdd375
Commit
81bdd375
authored
Feb 10, 2020
by
Akinwale Ariwodola
Browse files
call publish endpoint with selected channel on invites page
parent
601c589f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/page/invites/view.js
View file @
81bdd375
...
@@ -21,6 +21,7 @@ import RewardCard from 'component/rewardCard';
...
@@ -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 {
...
@@ -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
)
});
}
}
}
}
...
@@ -96,6 +98,7 @@ class InvitesPage extends React.PureComponent {
...
@@ -96,6 +98,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
)
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment