import * as _ from "lodash"; import * as React from "react"; import * as smoothscroll from 'smoothscroll-polyfill'; import { markdownToHtml } from "../../utilities/strings"; import { About, IAboutProps } from "../../components/About"; import { IStaticMapProps, StaticMap } from "../StaticMap"; import { Image } from "../../components/Image"; import { Pointer } from "../../components/Pointer"; import { Testimonials } from "../../components/Testimonials"; import { Treadmill, TreadmillDirection } from "../../components/Treadmill"; import { IVideoProps, Video } from "../../components/Video"; import { getImageSrc } from "../../utilities/image"; interface IAircamProps { staticMap: IStaticMapProps; about: IAboutProps; imagePrefix?: string; onLearnMore?: () => void; video?: IVideoProps; onTestimonialsInteraction?: () => void; testimonialsDisabled?: boolean; } export class Aircam extends React.Component { public componentDidMount() { smoothscroll.polyfill(); } public render() { return (
); } private renderPane = (pane: number): JSX.Element => { if (pane === 0) { return (
{ if (_.isFunction(this.props.onLearnMore)) { this.props.onLearnMore(); } document.getElementById('treadmill__pane-1').scrollIntoView({ behavior: "smooth" }); }} />
); } if (pane === 4) { return (
); } return (

{this.getParagraphForPane(pane - 1)}

{this.getContentForPane(pane - 1)}

); } /** * @param featurePane - The pane number excluding the first pane */ private getHeaderHtmlForPane = (featurePane: number): string => { switch (featurePane) { case 0: return markdownToHtml("**Instantly share** photos with those **around you**"); case 1: return markdownToHtml("**Anyone** can capture photos"); case 2: return markdownToHtml("See **Aircam in action**"); default: return ""; } } /** * @param featurePane - The pane number excluding the first pane */ private getParagraphForPane = (featurePane: number): string => { switch (featurePane) { case 0: return "Without anyone else downloading the app"; case 1: return "Built for professional photographers to iPhone amateurs. Use your iPhone camera or connect to a Canon, Sony or Nikon."; case 2: default: return ""; } } /** * @param featurePane - The pane number excluding the first pane */ private getContentForPane = (featurePane: number) => { switch (featurePane) { case 0: return ; case 1: return ; case 2: return ( <>
); default: return null; } } }