-
Notifications
You must be signed in to change notification settings - Fork 247
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
Requested : To help me ,how can I use Header section in my code #282
Comments
I want to use header profile_image and created date in my code |
import Modal from "react-bootstrap/Modal"; const renderer = ({ story, action, isPaused, config }) => { <video src={story.file} autoPlay={action === "play"} muted={!isPaused} /> ); } else if (story.file_type === "image") { return ( ); } else { return null; } }; const tester = (story) => { const App = ({ file, show, handleClose, profile_image, user_name }) => { useEffect(() => { const handleAllStoriesEnd = () => { const handleModalClose = () => { const stories = file?.map((story) => { return ( export default App; |
import Modal from "react-bootstrap/Modal";
import React from "react";
import Stories, {
WithSeeMore,
WithVideo,
WithHeader,
} from "react-insta-stories";
export const renderer = ({ story, action, isPaused, config }) => {
if (story.file_type === "video") {
return (
<video
src={story.file}
autoPlay={action === "play"}
muted={!isPaused}
/>
);
} else if (story.file_type === "image") {
return (
);
} else {
return null;
}
};
export const tester = (story) => {
return {
condition: story.file_type === "video" || story.file_type === "image",
priority: 3,
};
};
const App = ({ file, show, handleClose, profile_image }) => {
const convertedStories = file?.map((story) => {
if (story.file_type === "image") {
return { url: story.file, type: "image" };
} else if (story.file_type === "video") {
return { url: story.file, type: "video" };
}
});
return (
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
// width:"10vw"
}}
>
<Stories
stories={convertedStories}
renderers={[{ renderer, tester }]}
seeMore={}
height={"90vh"}
// width={"100vw"}
/>
);
};
export default App;
The text was updated successfully, but these errors were encountered: