-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated getChannel to Push SDK #1450
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/segments/ViewChannels.tsx
Outdated
@@ -88,14 +79,15 @@ function ViewChannels({ loadTeaser, playTeaser, minimal }) { | |||
|
|||
// to fetch initial channels and logged in user data | |||
const fetchInitialsChannelMeta = async () => { | |||
// fetch the meta of the first `CHANNELS_PER_PAGE` channels | |||
const channelsMeta = await getChannels({ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add try-catch here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added !
@@ -110,11 +102,11 @@ function ViewChannels({ loadTeaser, playTeaser, minimal }) { | |||
// load more channels when we get to the bottom of the page | |||
const loadMoreChannelMeta = async (newPageNumber: any) => { | |||
const startingPoint = newPageNumber * CHANNELS_PER_PAGE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add try-catch in this function as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added !
Changed getChannel method to get the channels list from push sdk using userPushSDKInstance.channel.list() method