Skip to content
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

When pressed image of a person inside render story model, How can i navigate if i have userID based on each user story ? #93

Closed
Ahsanali012 opened this issue Jul 15, 2024 · 4 comments · Fixed by #95
Assignees

Comments

@Ahsanali012
Copy link

I have my following code , My question is how can i press user image which is imageURL to navigate to my custom made screen as scenario is to show user profile. As we have story.id which works as userID

`
if (AllStoriesPosts && AllStoriesPosts.length > 0) {
InstaStories = AllStoriesPosts.map((story) => ({
id: story.id,
name: story.name,
imgUrl: story?.imgUrl,

  stories: story.stories.map((item) => {
    let mediaType: "video" | "image" | undefined;
    if (item.mediaType === "video" || item.mediaType === "image") {
      mediaType = item.mediaType;
    }
    return {
      id: item.id,
      mediaType: mediaType,
      sourceUrl: item.sourceUrl,
      renderContent: () => storyContent(item, story.id),
    };
  }),
}));

}
`

@LukasFridmansky
Copy link
Member

First of all, do you mean pressing user image in stories list or in story modal header? Secondly, you can't do that with current logic. The only thing you can do use renderAvatar or renderStoryHeader for story modal header. In that case you will need to handle styles and everything. But, if you describe what exactly you have in mind, I could add maybe some new properties

@Ahsanali012
Copy link
Author

First of all, do you mean pressing user image in stories list or in story modal header? Secondly, you can't do that with current logic. The only thing you can do use renderAvatar or renderStoryHeader for story modal header. In that case you will need to handle styles and everything. But, if you describe what exactly you have in mind, I could add maybe some new properties

In stories modal when stories on click modal appears and we have the story header with image , name

@LukasFridmansky LukasFridmansky self-assigned this Jul 22, 2024
@LukasFridmansky LukasFridmansky linked a pull request Jul 22, 2024 that will close this issue
@LukasFridmansky
Copy link
Member

Hey, you can add onStoryHeaderPress callback to every user, check README

@Ahsanali012
Copy link
Author

Hey, you can add onStoryHeaderPress callback to every user, check README

Thanks I'll try and let you know soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants