import * as React from "react"; import { Helmet } from "react-helmet"; import { StoryFeedMarquee } from "./StoryFeedMarquee"; import { StoryFeedWrapper, StoryFeedLabel } from "./StoryFeedStyledComponents"; import StoryFeed from "./StoryFeed"; import { CivilContext, ICivilContext } from "@joincivil/components"; export interface StoryFeedPageProps { match: any; location: any; history: any; payment?: boolean; newsroom?: boolean; } class StoryFeedPage extends React.Component { public static contextType = CivilContext; public static context: ICivilContext; public render(): JSX.Element { return ( <> Recent Stories ); } private closeStoryBoost = () => { let urlBase = this.props.location.pathname; urlBase = urlBase.substring(0, urlBase.indexOf("/")); this.props.history.push({ pathname: urlBase + "/storyfeed", }); }; private openStoryDetails = (postId: string) => { this.context.fireAnalyticsEvent("story boost", "story details clicked", postId); let urlBase = this.props.location.pathname; urlBase = urlBase.substring(0, urlBase.indexOf("/")); this.props.history.push({ pathname: urlBase + "/storyfeed/" + postId, }); }; private openPayments = (postId: string) => { this.context.fireAnalyticsEvent("story boost", "boost button clicked", postId); let urlBase = this.props.location.pathname; urlBase = urlBase.substring(0, urlBase.indexOf("/")); this.props.history.push({ pathname: urlBase + "/storyfeed/" + postId + "/payment", }); }; private openStoryNewsroomDetails = (postId: string) => { this.context.fireAnalyticsEvent("story boost", "newsroom details clicked", postId); let urlBase = this.props.location.pathname; urlBase = urlBase.substring(0, urlBase.indexOf("/")); this.props.history.push({ pathname: urlBase + "/storyfeed/" + postId + "/newsroom", }); }; } export default StoryFeedPage;