Skip to content
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

fix: Hero section primary button #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 44 additions & 29 deletions frontend/components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
"use client"
import { useRouter } from "next/navigation"
import { Feature } from "./Feature"
import { PrimaryButton } from "./buttons/PrimaryButton"
import { SecondaryButton } from "./buttons/SecondaryButton"
"use client";
import { useRouter } from "next/navigation";
import { Feature } from "./Feature";
import { PrimaryButton } from "./buttons/PrimaryButton";
import { SecondaryButton } from "./buttons/SecondaryButton";

export const Hero = () => {
const router = useRouter();
return <div>
<div className="flex justify-center">
<div className="text-5xl font-bold font-semibold text-center pt-8 max-w-xl">
Automate as fast as you can type
</div>
const router = useRouter();
return (
<div>
<div className="flex justify-center">
<div className="text-5xl font-bold font-semibold text-center pt-8 max-w-xl">
Automate as fast as you can type
</div>
<div className="flex justify-center pt-2">
<div className="text-xl font-bold font-normal text-center pt-8 max-w-2xl">
AI gives you automation superpowers, and Zapier puts them to work. Pairing AI and Zapier helps you turn ideas into workflows and bots that work for you.
</div>
</div>
<div className="flex justify-center pt-2">
<div className="text-xl font-bold font-normal text-center pt-8 max-w-2xl">
AI gives you automation superpowers, and Zapier puts them to work.
Pairing AI and Zapier helps you turn ideas into workflows and bots
that work for you.
</div>
</div>

<div className="flex justify-center pt-4">
<div className="flex">
<PrimaryButton onClick={() => {
router.push("/signup")
}} size="big">Get Started free</PrimaryButton>
<div className="pl-4">
<SecondaryButton onClick={() => {}} size="big">Contact Sales</SecondaryButton>
</div>
<div className="flex justify-center pt-4">
<div className="flex">
<div>
<PrimaryButton
onClick={() => {
router.push("/signup");
}}
size="big"
>
Get Started free
</PrimaryButton>
</div>
<div className="pl-4">
<div>
<SecondaryButton onClick={() => {}} size="big">
Contact Sales
</SecondaryButton>
</div>
</div>
</div>
</div>

<div className="flex justify-center pt-4">
<Feature title={"Free Forever"} subtitle={"for core features"} />
<Feature title={"More apps"} subtitle={"than any other platforms"} />
<Feature title={"Cutting Edge"} subtitle={"AI Features"} />
</div>
<div className="flex justify-center pt-4">
<Feature title={"Free Forever"} subtitle={"for core features"} />
<Feature title={"More apps"} subtitle={"than any other platforms"} />
<Feature title={"Cutting Edge"} subtitle={"AI Features"} />
</div>
</div>
}
);
};
28 changes: 20 additions & 8 deletions frontend/components/buttons/PrimaryButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import { ReactNode } from "react"
import { ReactNode } from "react";

export const PrimaryButton = ({ children, onClick, size = "small" }: {
children: ReactNode,
onClick: () => void,
size?: "big" | "small"
export const PrimaryButton = ({
children,
onClick,
size = "small",
}: {
children: ReactNode;
onClick: () => void;
size?: "big" | "small";
}) => {
return <div onClick={onClick} className={`${size === "small" ? "text-sm" : "text-xl"} ${size === "small" ? "px-8 py-2" : "px-10 py-4"} cursor-pointer hover:shadow-md bg-amber-700 text-white rounded-full text-center flex justify-center flex-col`}>
{children}
return (
<div
onClick={onClick}
className={`${
size === "small" ? "text-sm px-8 py-2" : "text-xl px-14 py-3"
}
cursor-pointer hover:shadow-md bg-amber-700 text-white rounded-full text-center flex justify-center flex-col`}
>
{children}
</div>
}
);
};
27 changes: 19 additions & 8 deletions frontend/components/buttons/SecondaryButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import { ReactNode } from "react"
import { ReactNode } from "react";

export const SecondaryButton = ({ children, onClick, size = "small" }: {
children: ReactNode,
onClick: () => void,
size?: "big" | "small"
export const SecondaryButton = ({
children,
onClick,
size = "small",
}: {
children: ReactNode;
onClick: () => void;
size?: "big" | "small";
}) => {
return <div onClick={onClick} className={`${size === "small" ? "text-sm" : "text-xl"} ${size === "small" ? "px-8 pt-2" : "px-10 py-4"} cursor-pointer hover:shadow-md border text-black border-black rounded-full`}>
{children}
return (
<div
onClick={onClick}
className={`${
size === "small" ? "text-sm px-8 py-2" : "text-xl px-14 py-3"
} cursor-pointer hover:shadow-md border text-black border-black rounded-full`}
>
{children}
</div>
}
);
};