Skip to content

Commit

Permalink
Add petition to Petaluma Poultry page
Browse files Browse the repository at this point in the history
Zoe said she doesn't want to refer people to perdueabuse.com if there is
no petition on there for people to sign.

Add support in header component for alternative targets so the page
does not refresh when clicking a button that links to something further
down on the same page.
  • Loading branch information
alexsapps committed Jan 21, 2025
1 parent a7c6656 commit 4f9462c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
9 changes: 6 additions & 3 deletions components/CasePage/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Header = (props: HeaderProps) => {
<p className="text-white">
<a
href={props.ctaLink1}
target="_blank"
target={props.ctaTarget1 ?? "_blank"}
className="btn btn-primary w-100"
>
{props.ctaText1}
Expand All @@ -93,7 +93,7 @@ export const Header = (props: HeaderProps) => {
<p className="text-white">
<a
href={props.ctaLink2}
target="_blank"
target={props.ctaTarget2 ?? "_blank"}
className="btn btn-primary w-100"
>
{props.ctaText2}
Expand All @@ -104,7 +104,7 @@ export const Header = (props: HeaderProps) => {
<p className="text-white mb-5">
<a
href={props.ctaLink3}
target="_blank"
target={props.ctaTarget3 ?? "_blank"}
className="btn btn-primary w-100"
>
{props.ctaText3}
Expand All @@ -127,9 +127,12 @@ interface HeaderProps {
videoRatio: string;
ctaText1?: string;
ctaLink1?: string;
ctaTarget1?: string;
ctaText2?: string;
ctaLink2?: string;
ctaTarget2?: string;
ctaText3?: string;
ctaLink3?: string;
ctaTarget3?: string;
children?: any;
}
16 changes: 8 additions & 8 deletions components/HomePage/Letter.tsx → components/Letter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
DEFAULT_MESSAGE,
PetitionForm,
PetitionFormSchema,
} from "../../data/petition";
} from "../data/petition";
import ky from "ky";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
import { Alert, AlertDescription, AlertTitle } from "./ui/alert";
import { LoaderIcon, MailCheckIcon } from "lucide-react";
import {
Form,
Expand All @@ -17,13 +17,13 @@ import {
FormItem,
FormLabel,
FormMessage,
} from "../ui/form";
import { Input } from "../ui/input";
import { Checkbox } from "../ui/checkbox";
import { Textarea } from "../ui/textarea";
import { Button } from "../ui/button";
} from "./ui/form";
import { Input } from "./ui/input";
import { Checkbox } from "./ui/checkbox";
import { Textarea } from "./ui/textarea";
import { Button } from "./ui/button";
import ReCAPTCHA from "react-google-recaptcha";
import { getInstance as getAdReferralService } from "../../services/AdReferralService";
import { getInstance as getAdReferralService } from "../services/AdReferralService";

const PETITION_API_URL = "https://petitions-229503.appspot.com/api/sign";

Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Announcement } from "../components/HomePage/Announcement";
import { FeaturedCase } from "../components/HomePage/FeaturedCase";
import { About } from "../components/HomePage/About";
import TwitterTimeline from "../components/Twitter";
import { Letter } from "../components/HomePage/Letter";
import { Letter } from "../components/Letter";

const Home: NextPage = () => {
return (
Expand Down
27 changes: 18 additions & 9 deletions pages/petalumapoultry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Press } from "../components/CasePage/Press";
import { Article } from "../components/CasePage/Article";
import { Col, Row } from "react-bootstrap";
import TwitterTimeline from "../components/Twitter";
import { Letter } from "../components/Letter";

const Reichardt: NextPage = () => {
return (
Expand All @@ -19,7 +20,9 @@ const Reichardt: NextPage = () => {
ctaText1="Register to attend trial"
ctaLink1="https://docs.google.com/forms/d/e/1FAIpQLSeoS_f-9g-NsWVqEofwwy2PuBoPQinW2j4KJpbP47b6bHBtxg/viewform"
ctaText2="Email the DA"
ctaLink2="mailto:[email protected]"
ctaLink2="#letter"
// Just scrolling down to #letter -- default target="_blank" is not desired here.
ctaTarget2="auto"
>
Register to attend the trial convergence in support of Zoe and the right to rescue. Plus, email Sonoma County District Attorney Carla Rodriguez and ask
her to finally prosecute Petaluma Poultry for years of criminal animal
Expand Down Expand Up @@ -103,14 +106,20 @@ const Reichardt: NextPage = () => {
</p>
</Details>

<Defendants>
<Bio name="Zoe Rosenberg" image="Zoe-and-Glenn.jpeg">
Zoe is a UC Berkeley student, TEDx speaker, factory farm investigator,
and animal rescuer. When she was 11 years old, she founded Happy Hen
Animal Sanctuary, a nonprofit organization that has now saved over
1,000 neglected or abandoned animals.
</Bio>
</Defendants>
<div id="letter">
<Letter />
</div>

<div className="bg-light pt-5"> {/* Add white padding on top */}
<Defendants>
<Bio name="Zoe Rosenberg" image="Zoe-and-Glenn.jpeg">
Zoe is a UC Berkeley student, TEDx speaker, factory farm investigator,
and animal rescuer. When she was 11 years old, she founded Happy Hen
Animal Sanctuary, a nonprofit organization that has now saved over
1,000 neglected or abandoned animals.
</Bio>
</Defendants>
</div>
<Press>
<Article
href="https://theintercept.com/2023/06/13/perdue-chicken-slaughterhouse-animal-cruelty-dxe/"
Expand Down

0 comments on commit 4f9462c

Please sign in to comment.