|
| 1 | +import styles from "./styles.module.css"; |
| 2 | +import React from "react"; |
| 3 | +import IconContainer from "./IconContainer"; |
| 4 | +import LinkToGetAQuote from "./LinkToGetAQuote"; |
| 5 | +import { useHistory, useLocation } from "@docusaurus/router"; |
| 6 | + |
| 7 | +export function LargeProjectCardContent({ project }) { |
| 8 | + const history = useHistory(); |
| 9 | + const location = useLocation(); |
| 10 | + |
| 11 | + function openDialog() { |
| 12 | + const pageName = project.pageName; |
| 13 | + |
| 14 | + history.push({ |
| 15 | + pathname: `/fundable/${pageName}/GetAQuote`, |
| 16 | + state: { from: location.pathname, scrollY: window.scrollY }, |
| 17 | + }); |
| 18 | + } |
| 19 | + return ( |
| 20 | + <div className={"container"} onClick={openDialog}> |
| 21 | + <div className={"row-padding-none"}> |
| 22 | + <div className="col col--12"> |
| 23 | + <div className={styles.large_project_card_title}>{project.title}</div> |
| 24 | + </div> |
| 25 | + <div style={{ padding: "0 16px" }}><IconContainer project={project} /></div> |
| 26 | + </div> |
| 27 | + <div className="row"> |
| 28 | + <div className="col col--12"> |
| 29 | + <div className={styles.large_project_card_text_container}> |
| 30 | + <div className={styles.large_project_card_section_title}>Overview</div> |
| 31 | + <div className={styles.large_project_card_description_container}> |
| 32 | + <div className={styles.large_project_card_description}> |
| 33 | + <project.description /> |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + <div className={styles.large_project_card_section_title}>Option A</div> |
| 37 | + <div className={styles.large_project_card_option}> |
| 38 | + {project.optionA} |
| 39 | + </div> |
| 40 | + <div className={styles.large_project_card_section_title}>Option B</div> |
| 41 | + <div className={styles.large_project_card_option}> |
| 42 | + {project.optionB} |
| 43 | + </div> |
| 44 | + <div className={styles.large_project_card_section_title}>Custom Option</div> |
| 45 | + <div className={styles.large_project_card_option}> |
| 46 | + {project.customOption} |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + ) |
| 53 | +} |
| 54 | +export default function LargeProjectCard({ project }) { |
| 55 | + return ( |
| 56 | + <div className={styles.large_project_card}> |
| 57 | + <LargeProjectCardContent project={project} /> |
| 58 | + <div className="row"> |
| 59 | + <div className="col col--12"> |
| 60 | + <div className={styles.large_project_card_contact_text}>Are you interested in this project? Either entirely or partially, contact us for more information on how to help us fund it.</div> |
| 61 | + <div><LinkToGetAQuote label={"GET A QUOTE"} pageName={project.pageName} /></div> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + |
| 66 | + ); |
| 67 | +} |
0 commit comments